Skip to main content
6 events
when toggle format what by license comment
Sep 30, 2013 at 13:51 vote accept Icode4food
Sep 27, 2013 at 20:55 comment added jonhattan Oh I see the cache is not written to database in module_implements() but module_implements_write_cache(), that is called from drupal_page_footer(), so your solution doesn't affect other threads. Nice!
Sep 27, 2013 at 20:52 comment added jonhattan yep. module_implements() uses a static cache AND database cache. You're asking the function to reset the database cache (third argument = true). OTOH it seems my recomendation for hook_module_implements_alter() is neither adequate.
Sep 27, 2013 at 19:33 comment added Icode4food @jonhattan I don't believe you are correct about this effecting all users and being stored in the db. Both of the function calls only store their cached values in a static variable. Unless there is another module that calls these and updates the db cache for every page call (highly unlikely in my opinion) this change will only be in-memory for the current request, exactly what I want.
Sep 27, 2013 at 19:27 comment added jonhattan This stores the hooks to the cache in database, and affects all users untill next cache clear. Try hook_module_implements_alter() in your drush command. A sneaky way to implement a hook in a module is to use the prefix of a module that you know is enabled --and doesn't implement that hook--, for example: system_module_implements_alter()
Sep 27, 2013 at 19:15 history answered Icode4food CC BY-SA 3.0