Clear cache as an automated job
Permalink
Hi, 1) how do I add the "clear cache" action to the "automated jobs" list? and 2) how to suggest to the core C5 developers to add "clear cache" as a default automated job?
Interesting addons. Thanks. The "Clear Cache" is what I'm looking for. However, does it do the job correctly?
I can see the only thing it does is:
While the C5 core code to clear the cache is:
Should I call that "clearOverrideCache()" function as well?
I can see the only thing it does is:
Cache::flush();
While the C5 core code to clear the cache is:
public function do_clear() { if ($this->token->validate("clear_cache")) { if ($this->isPost()) { Cache::flush(); $env = Environment::get(); $env->clearOverrideCache(); $this->redirect('/dashboard/system/optimization/clear_cache', 'cache_cleared'); } } else { $this->set('error', array($this->token->getErrorMessage())); } }
Should I call that "clearOverrideCache()" function as well?
Yeah, this add-on was built for version 5.3 so I suppose you need to update it. I would add:
and see how it works.
Cache::flush(); $env = Environment::get(); $env->clearOverrideCache();
and see how it works.
Thanks mhawke. It seems to be working fine. Hopefully the addon author will update it. I have asked him for support regarding this matter.
Also worth pointing to some code that Jordan Lev created to use automated jobs.
http://andrewembler.com/posts/improving-the-performance-of-zend-cac...
Code can be seen here,
http://pastie.org/5476483
It removes files older then 1 week
http://andrewembler.com/posts/improving-the-performance-of-zend-cac...
Code can be seen here,
http://pastie.org/5476483
It removes files older then 1 week
I built Jordan's method and a selection of others into a free addon job, currently in the prb:
http://www.concrete5.org/marketplace/review_pending/-/view_detail/1...
There is an associated cache filler job, also currently in the prb:
http://www.concrete5.org/marketplace/review_pending/-/view_detail/1...
http://www.concrete5.org/marketplace/review_pending/-/view_detail/1...
There is an associated cache filler job, also currently in the prb:
http://www.concrete5.org/marketplace/review_pending/-/view_detail/1...
http://www.concrete5.org/marketplace/addons/clear-cache/...
http://www.concrete5.org/marketplace/addons/nontab-scheduler/...