• 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)
  • 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

    (@joelsmashballoon)

    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

    Joel

    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

    (@joelsmashballoon)

    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.