hey vdereks;
We should first try to identify whether the problem is with the CSS/ JS cache (which is part of the free version of AO which I support here) or with the page cache (which is part of AOPro and which I can’t support here). Are you using AOPro page caching and if so does the problem go away when disabling that?
frank
I am NOT using page caching. Issue happens when clearing the JS/CSS cache. I’m not using JS optimizations, only CSS.
-
This reply was modified 4 months, 3 weeks ago by vDerekS.
OK, in that case this is an Autoptimize question and not an AOPro one so we can continue here 😉
Regarding the broader context; there is no need (or use) for clearing the AO JS/ CSS cache when updating a page/ post really 😉
Regarding the high CPU usage; how big is your JS/ CSS cache when this happens (number of files/ total size in MB)?
Well it’s over 200MB and over 300 files.
that’s not a lot at all .. the “clear cache” logic is pretty straightforward and has not changed in years, so the question is what changed months ago to trigger this high CPU load.
anyway, AO’s cache logic has an option to delete another way (with a rename instead of individual files being removed), you can trigger that advanced logic (which was built taking big cache sizes into account) by adding this code snippet;
add_filter( 'autoptimize_filter_cache_clear_advanced', '__return_true' );
maybe give that a try?
The easiest & safest solution is using the code snippets plugin 🙂
So did this change fix the CPU load issue when clearing the cache @vdereks ?