titanium Posted September 30, 2013 Share Posted September 30, 2013 Hi, I have build a custom module which changes a bunch of pages at once. How can I delete the cache of all pages to be sure that all pages reflect the latest changes? I didn't found anything in the API docs. Link to comment Share on other sites More sharing options...
adrian Posted September 30, 2013 Share Posted September 30, 2013 Are you talking about the Markup Cache module? If so, you should be able to use: $cache->removeAll(); 1 Link to comment Share on other sites More sharing options...
ryan Posted October 4, 2013 Share Posted October 4, 2013 I have build a custom module which changes a bunch of pages at once. How can I delete the cache of all pages to be sure that all pages reflect the latest changes? I didn't found anything in the API docs. It really depends what cache you are talking about? Template cache, Markup cache, runtime memory cache, ProCache? All of these caches usually clear themselves for the saved page, so you don't usually have to consider the cache except for pages that may be pulling pulling data from a separate cached page. Link to comment Share on other sites More sharing options...
titanium Posted October 4, 2013 Author Share Posted October 4, 2013 It really depends what cache you are talking about? Template cache, Markup cache, runtime memory cache, ProCache? All of these caches usually clear themselves for the saved page, so you don't usually have to consider the cache except for pages that may be pulling pulling data from a separate cached page. Thanks Ryan, I should have been more precise. I did mean template cache. Meanwhile, I found some kind of workaround. As you said, this cache gets cleared when the page is saved, therefore I wrote at the top of the template: $page->of(false); $page->save(); $page->of(true); These actions just occur if a certain condition is met. I did this because I have build a contact form, which could be added with the help of Hanna Code to an otherwise cached page. I didn't want the client to select another (uncached) template if he uses this hanna code. I think it works so far. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now