Error in CTF_Cache_Handler with autoptimize

that begs the question; why / when would a widget have to clear Autoptime’s cache as AO does not do page caching (or object or feed caching)? :-/

frank (ao dev)

Hey @kalyx,

Thank you for reaching out about this, I have reported it to the developers and we’ll check to ensure the error is fixed in a coming update.

@optimizingmatters thanks for checking in here! It has been a while since we added this, however in most cases we have users reach out with specific cache plugin conflicts and in many cases, clearing the caches proved to be an effective way of resolving issues. In this case, it could have been as simple as clearing optimized files – we have seen issues with users (again this could work differently now) have their feeds work incorrectly due to our files being optimized and not being properly re-optimized after updates, as an example. As a dev from AO, we would welcome any feedback on how that could be otherwise avoided or if clearing the cache in this way could be outright detrimental for AO users.

Many thanks


nice to meet you Joel 🙂

Autoptimize when optimizing checks the cache for already optimized file, but if a file changed the cache check will fail (cache logic is based on an md5 check of the file contents), so it _should_ not be needed to clear AO’s cache in case of JS (or CSS) file changes.

The big reason why not to clear the AO cache; in case AO’s cache is cleared but there is a page cache whose cache is not cleared, the HTML in the page cache contains references to autoptimized files which are not there anymore, breaking the site rather badly.

Thanks for the additional details. I will make note to look into whether we should just remove the AO cache clear call at this point!


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer