We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

hooks on cache cleaning

Developer Preview

Sobral's avatar
Sobral
87 posts
10 years ago
Sobral's avatar Sobral

Hi!

Let’s shake out the dust of this forum a little.

You guys gave us a great cache class. Thanks for that! It’s really useful!

Can I ask you for something more? A hook to clean the cache. The clients already know where they can clear the cache (Tools > Data > Clear Caching). To create another form just for a plugin is too much. Can you, please, give us a hook on the option “all” of cache purging?

Thanks!

       
Wes Baker's avatar
Wes Baker
343 posts
10 years ago
Wes Baker's avatar Wes Baker

Instead of a hook, you can just use the Cache class, specifically you can use Cache::clean() to clean the whole cache or Cache::delete() to delete specific keys and namespaces.

       
Sobral's avatar
Sobral
87 posts
10 years ago
Sobral's avatar Sobral

I’m using them, @wes! I’m cleaning the cache on the hooks delete_entries_loop and entry_submission_end.

I need to allow the users to flush the cache arbitrarily, like they’re already able to do on the other caches. I need to include my custom cache on the option all. I don’t want to create a custom form just for that, because is better to the users to find all options in one form.

Plus, if we could add a custom option there too, add-ons like Mustache, Minimee and CE Cache could consolidate all their flushing options in one single place.

Imagine that on CP > Tools > Data > Clear Caching):

  • page (template) cache files;
  • tag cache files;
  • database cache files;
  • minimee cache files;
  • mustache cache files;
  • all caches;

Hey! Is this page on user guide updated? Cached Relationship entries is still an option?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.