cubicweb #3544430 [cache] introduce a cache API and some implementations [rejected]
We will soon need to be able to cache values using various backends (e.g. database, memcached), and we need a clearly defined API. We also will provide some implementations for common cases.
This will serve the needs of sessions handling (and other cache uses) with many out-of-process web workers. | |
priority | normal |
---|---|
type | enhancement |
done in | 3.21.0 |
load | 0.000 |
load left | 0.000 |
closed by | <not specified> |
patch | [cache] introduce the simplest possible cache api [rejected][web] rename user -> login [rejected][cache] introduce dogpile cache for some standard cache implementations [rejected][cache] replace plain python dict with in-memory session cache [rejected] |
similar entities
Comments
-
2014/02/12 17:57, written by adimascio
-
2014/02/12 18:09, written by acampeas
-
2014/02/13 13:17, written by acampeas
-
2014/02/13 13:34, written by acampeas
add commentCould you please detail a bit the different use-cases you have in mind and the corresponding API ?
Apart from the ticket description, one candidate would be the conversions done by mtc_converter in entity.py
The api is shown in the patch. A cache is an object with .get .set and .delete methods.
Two issues are raised:
* what about invalidation methods ?
* shouldn't the initializer take a lifetime parameter that would govern cached object accessibility ?
We should separate the notions of cache API & key-value store API.