Support » Plugins » [Plugin: WP File Cache] Plugin not caching persistently

  • Very sad 🙁

    I loved your plugin but when I did some extra tests I saw it’s not working at all.

    I’ve made a bunch of debugs and @file_put_contents() IS writing cache files, it returns some amount of bytes being written and files ARE being saved on database.

    But then something I can’t discover what delete these files, even before a new page load happens. And when I reload the page, cache is empty, $files is an array without any data inside.

    On every page load wp_cache_get() always return false on first attempt, my plugin queries data from database and wp_cache_set() it. Next wp_cache_get() attempts return cache, but on next page load cache is gone again.

    I’ve tested it on an development environment that only I have access and I know nobody else is accessing it, tried being logged in and off.

    Maybe it’s something related to apache or php, glob() simply returns empty array and something deletes files just after they are created. You plugin doesn’t have a chance to file_get_contents() because empty($files) is always true, but I can’t understand what may be deleting them if file_put_contents() creates them.

    Do you have any suggestion of what I can try to fix it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Files are for sure being written.

    When cache is gonna be read, glob() returns an empty string, and then funtion returns.

    I’ve used print_r($files); and pratically always it prints Array ( )

    So I see 2 possibilities, glob() is deleting cache files, or something else is deleting them and when glob() runs it finds nothing.

    When cache is gonna be read, glob() returns an empty ARRAY I mean

    Problem solved!

    A plugin was flushing the cache EVERY time it does a get_option()… It seems its author uses AJAX in plugin admin page and maybe options were cached and weren’t being updated, so he got angry with cache.

    I removed flush line and it worked 🙂

    Vladimir Kolesnikov


    What plugin was that?

    NAVT :p

    It’s the best menu generator for WordPress, but its author is somehow temperamental, probably he had problems with cache and decided to solve it flushing the whole cache. I removed the call and cache worked.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP File Cache] Plugin not caching persistently’ is closed to new replies.