Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Entitycache module provides hooks to act on entities after:
- being removed from the entitycache: hook_entitycache_reset()
- being loaded from the entitycache: hook_entitycache_load()
Is there a possibility the Entitycache module could be even made more versatile by adding a hook to act on entities after being added to the entity cache?
Comment | File | Size | Author |
---|---|---|---|
#1 | hook_entitycache_set-2159775-0.patch | 1.57 KB | rp7 |
Comments
Comment #1
rp7 CreditAttribution: rp7 commentedAttached a patch. New hooks would be:
Comment #2
Vacilando CreditAttribution: Vacilando commentedGreat idea — and the patch works perfectly! Hoping it will be committed to dev soon.
Comment #3
catchThis needs an explanation of the use case.
Comment #4
rp7 CreditAttribution: rp7 commentedI'm working on a module to pro-actively cache items into the entity cache (https://www.drupal.org/sandbox/raf/2190935). This is done by tracking which entity has been cached already, and which hasn't. Therefore it heavily relies on this hook.
Comment #5
amonteroPerhaps the Cache Object API module might be useful.
Also, I've linked to another similar issue.