File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1212### Configuration
1313
1414### Core
15+ - ` intelmq.lib.mixins.cache.CacheMixin ` was extended to support temporary storing messages in a cache queue
16+ (PR #2509 by Kamil Mankowski).
1517
1618### Development
1719
Original file line number Diff line number Diff line change @@ -197,14 +197,26 @@ The `CacheMixin` provides methods to cache values for bots in a Redis database.
197197- ` redis_cache_ttl: int = 15 `
198198- ` redis_cache_password: Optional[str] = None `
199199
200- and provides the methods:
200+ and provides the methods to cache key-value pairs :
201201
202202- ` cache_exists `
203203- ` cache_get `
204204- ` cache_set `
205205- ` cache_flush `
206206- ` cache_get_redis_instance `
207207
208+ and following methods to cache objects in a queue:
209+
210+ - ` cache_put `
211+ - ` cache_pop `
212+ - ` cache_length ` .
213+
214+ Caching key-value pairs and queue caching are two separated mechanisms. The first is designed
215+ for arbitrary values, the second one is focused on temporary storing messages (but can handle other
216+ data). You won't see caches from one in the another. For example, if adding a key-value pair using
217+ ` cache_set ` , it does not change the value from ` cache_length ` , and if adding an element using
218+ ` cache_put ` you cannot use ` check_exists ` to look for it.
219+
208220### Pipeline Interactions
209221
210222We can call three methods related to the pipeline:
Original file line number Diff line number Diff line change 1313
1414
1515class CacheMixin :
16- """Provides caching possibilities for bots
16+ """Provides caching possibilities for bots, see also https://docs.intelmq.org/latest/dev/bot-development/#mixins
1717
1818 For key-value cache, use methods:
1919 cache_exists
You can’t perform that action at this time.
0 commit comments