Title: Error in CTF_Cache_Handler with autoptimize
Last modified: March 15, 2023

---

# Error in CTF_Cache_Handler with autoptimize

 *  Resolved [serge rauber](https://wordpress.org/support/users/kalyx/)
 * (@kalyx)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-in-ctf_cache_handler-with-autoptimize/)
 * Hi
 * I’ve got that error when trying to update feed cache
   `PHP Fatal error: Uncaught
   Error: Class 'TwitterFeed\Admin\autoptimizeCache' not found in /public_html/wp-
   content/plugins/custom-twitter-feeds/inc/Admin/CTF_Cache_Handler.php:167`PHP 
   7.2.4, WP 6.1.1
 * Fixed by adding \ before autoptimizeCache::clearall
 * `if ( class_exists( 'autoptimizeCache' ) ) {
   \autoptimizeCache::clearall();}

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-in-ctf_cache_handler-with-autoptimize/#post-16562770)
 * 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)
 *  Plugin Support [Smash Balloon Joel](https://wordpress.org/support/users/joelsmashballoon/)
 * (@joelsmashballoon)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-in-ctf_cache_handler-with-autoptimize/#post-16563190)
 * Hey [@kalyx](https://wordpress.org/support/users/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](https://wordpress.org/support/users/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
 * Joel
 *  [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-in-ctf_cache_handler-with-autoptimize/#post-16563244)
 * 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.
 *  Plugin Support [Smash Balloon Joel](https://wordpress.org/support/users/joelsmashballoon/)
 * (@joelsmashballoon)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/error-in-ctf_cache_handler-with-autoptimize/#post-16563278)
 * 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!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error in CTF_Cache_Handler with autoptimize’ is closed to new replies.

 * ![](https://ps.w.org/custom-twitter-feeds/assets/icon-256x256.png?rev=2700808)
 * [Custom Twitter Feeds - A Tweets Widget or X Feed Widget](https://wordpress.org/plugins/custom-twitter-feeds/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-twitter-feeds/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-twitter-feeds/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-twitter-feeds/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-twitter-feeds/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-twitter-feeds/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Smash Balloon Joel](https://wordpress.org/support/users/joelsmashballoon/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/error-in-ctf_cache_handler-with-autoptimize/#post-16563278)
 * Status: resolved