I've made a patch that basically deals with trying to prevent entire bins from clearing, when not necessary. Drupal, by default, usually clears at least the page/block cache (the entire bin), even though not necessary (in case a node is edited, for instance). As memcache uses hash keys, it is impossible to selectively clear cache using wildcards. So, a simple string matching in the GET takes care of that. Furthermore, I've made a small module (not commited yet, but attached here), that simply allows a site admin to make cid|timeout pairs for any block/page. In the SET stage, the system checks if that particular cid benefits from a custom timeout, and if so, sets it accordingly. All other items are enforced to use the minimum cache lifetime, and their particular life does not end sooner, unless a cache_clear_all has been issued, with the exact cid.
| Comment | File | Size | Author |
|---|---|---|---|
| cache_manager.zip | 2.02 KB | BogdanN | |
| selective_cache.patch | 9.45 KB | BogdanN |
Comments
Comment #1
markpavlitski commentedHi BogdanN!
I think we would need to wait until your module is approved before looking at integration with the memcache module.
Please post a link to your module page, if it has been approved as a full module.
Comment #2
markpavlitski commentedNo activity for 6 weeks. Marking closed.