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.

CommentFileSizeAuthor
cache_manager.zip2.02 KBBogdanN
selective_cache.patch9.45 KBBogdanN

Comments

markpavlitski’s picture

Title: Selective cache clearing/timeout setup » Integration with cache_manager module for selective cache clearing/timeout setup
Status: Needs review » Postponed

Hi 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.

markpavlitski’s picture

Status: Postponed » Closed (won't fix)

No activity for 6 weeks. Marking closed.