clearing cache from Autoptimize: base_dir option
-
Hi Raam Dev;
I just pushed out Autoptimize 2.0.1 which has some minor changes in how (when) it clears Zen Cache’s cache; previously this was triggered via a one-time wp-cron job, now it hooks intoplugins_loaded
action and (as before) for ZenCache simply does;if ( class_exists("zencache") ) { zencache::clear(); }
I don’t know how I missed it during testing, but this triggers this nasty error:
E:\xampp\htdocs\wordpress\wp-content\plugins\zencache\src\includes\closures\Plugin\DirUtils.php:21
Stack trace:
#0 [internal function]: WebSharks\ZenCache\Plugin->WebSharks\ZenCache\{closure}(‘cache’)
#1 E:\xampp\htdocs\wordpress\wp-content\plugins\zencache\src\includes\classes\AbsBaseAp.php(55): call_user_func_array(Object(Closure), Array)
#2 E:\xampp\htdocs\wordpress\wp-content\plugins\zencache\src\includes\closures\Shared\CacheDirUtils.php(21): WebSharks\ZenCache\AbsBaseAp->__call(‘wpContentBaseDi…’, Array)
#3 E:\xampp\htdocs\wordpress\wp-content\plugins\zencache\src\includes\closures\Shared\CacheDirUtils.php(21): WebSharks\ZenCache\Plugin->wpContentBaseDirTo(‘cache’)
#4 [internal function]: WebSharks\ZenCache\AbsBaseAp->WebSharks\ZenCache\{closure}()
#5 E:\xampp\htdocs\wordpress\wp-content\plugins\zencache\src\includes\classes\AbsBaseAp.php(55): call_user_func_array(Object(Closure), Array)
#6 E:\xampp\htdocs\wordpress\wp-c in E:\xampp\htdocs\wordpress\wp-content\plugins\zencache\src\includes\closures\Plugin\DirUtils.php on line 21When wrapping the code in a try/catch block;
if ( class_exists("zencache") ) { try {zencache::clear();} catch(Exception $e) {// auch } }
there (obviously) is no error thrown any more and the cache is successfully cleared.
So my question; is this something I should fix, or can you do something on your side?
frank
- The topic ‘clearing cache from Autoptimize: base_dir option’ is closed to new replies.