• Resolved Arun R Shenoy

    (@arunshenoy99)


    Hello team,

    We’ve noticed an issue where the object-cache.php file is not being deleted/cleaned up when Object Caching is disabled in the plugin.

    Because of this, even after disabling Object Caching:

    • The object-cache.php file continues to load.
    • That file tries to connect to an in-memory cache instance (Memcached/Redis), which is not available.
    • This causes transient retrieval to fail, since WordPress is forced to use a disabled object cache backend instead of falling back to the default.
    • W3 Total Cache → Object caching disabled, but object-cache.php was still forcibly being used.

    Could you please update the plugin so that when Object Caching is disabled, the object-cache.php file is automatically deleted (or at least not loaded)? This would prevent WordPress from attempting to use a disabled cache instance and avoid transient/data retrieval errors.

    This small cleanup step would align behavior with user expectation: when Object Caching is disabled, WordPress should revert to its native behavior without interference.

    Thanks for looking into this!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @arunshenoy99

    Thank you for reaching out, and I am happy to help!
    I’ve just tested the behavior for this. I had an Object Cache enabled using APCu. The object-cache.php drop-in was in the /wp-content/ folder.
    I disabled the Object Caching in the General settings, saved all settings, and purged the cache. After this, I checked and the mentioned object-cache.php drop-in was removed.
    So I was not able to replicate this.
    Have you saved all settings and purged the cache after you disabled OC in the General settings?
    Have you checked the file permissions for the wp-content folder, and how are those set?


    Thanks!

    Thread Starter Arun R Shenoy

    (@arunshenoy99)

    Hi @vmarko, thanks for checking. I’ll follow the steps and check the permissions on my site again, as you mentioned, to see if I can replicate the issue and will update here.

    Thread Starter Arun R Shenoy

    (@arunshenoy99)

    Hi @vmarko, thanks a lot for all the help! 🙏 The issue was on my side, I was deactivating the plugin via WP-CLI while skipping themes and plugins. It’s working fine now after fixing that. Marking this ticket as resolved.

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

The topic ‘object-cache.php not removed when Object Caching is disabled’ is closed to new replies.