Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Entitycache module is good for speeding things up on a node and user-heavy site. However, its cache needs to be cleared whenever changes happen to the user object. Twitter module doesn't save its settings using user_save(), so cache clearing isn't invoked. Attached patch makes it work with entitycache.
Comment | File | Size | Author |
---|---|---|---|
patch_commit_f2214eadf1c1.patch | 1.43 KB | moonray | |
Comments
Comment #1
juampynr CreditAttribution: juampynr commentedI think this would be much more flexibly integrated through a hook at Twitter module so Entity Cache can jump in and clear.
Looking forward for a patch.
Comment #2
moonray CreditAttribution: moonray commentedI doubt it's within the scope of entity cache module to go clearing out the cache for each and every module enable on the site that happens to invalidate entities.
Comment #3
juampynr CreditAttribution: juampynr commentedOK, I will discuss this with more people. I am worried that, with this approach, the module could get a lot of "if (module_exist('module_name')" statements, which could make it less maintainable. Instead, it could implement hooks at certain points and submodules that would jump in them (such as a twitter_entitycache submodule).
We are doing a DrupalConTribute event this Saturday at Spain so I am looking forward for a patch on this and other issues.
Thanks for the initiative on this.
Comment #4
Fidelix CreditAttribution: Fidelix commentedAny news on this?
It simply makes sense that twitter integrates with entitycache, and not the other way around.
Comment #5
kenneth.venken CreditAttribution: kenneth.venken commentedIt seems that the twitter library isn't loaded when entitycache deserializes the user object.
Adding
to the top of one of my modules fixes the issue for me.
Comment #6
dddave CreditAttribution: dddave commentedIs this still relevant?
Comment #7
DamienMcKenna