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 12
12
### Configuration
13
13
14
14
### Core
15
+ - ` intelmq.lib.mixins.cache.CacheMixin ` was extended to support temporary storing messages in a cache queue
16
+ (PR #2509 by Kamil Mankowski).
15
17
16
18
### Development
17
19
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.
197
197
- ` redis_cache_ttl: int = 15 `
198
198
- ` redis_cache_password: Optional[str] = None `
199
199
200
- and provides the methods:
200
+ and provides the methods to cache key-value pairs :
201
201
202
202
- ` cache_exists `
203
203
- ` cache_get `
204
204
- ` cache_set `
205
205
- ` cache_flush `
206
206
- ` cache_get_redis_instance `
207
207
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
+
208
220
### Pipeline Interactions
209
221
210
222
We can call three methods related to the pipeline:
Original file line number Diff line number Diff line change 13
13
14
14
15
15
class CacheMixin :
16
- """Provides caching possibilities for bots
16
+ """Provides caching possibilities for bots, see also https://docs.intelmq.org/latest/dev/bot-development/#mixins
17
17
18
18
For key-value cache, use methods:
19
19
cache_exists
You can’t perform that action at this time.
0 commit comments