• Resolved G

    (@gnetworkau)


    Nice cache plugin, simple and fast – thankyou! I had a few small problems starting out, thought you may like some feedback. I am using the “snippet” method (htaccess rewrites) which I favor as its the fastest.

    First problem I encountered was that all the images disappeared. Being on an old MU multisite install (over 10 years old), I realised quickly, that it was the old uploads directory problem. After jamming the needed rewrite rule into the snippet section “wp override”, the images appeared again – all sweet.

    Upon testing the working of the cache, I found another issue, the Categories were not being cached. Not sure why, as the Tags got cached without problem. So I headed to the “Cache Inclusions” section in settings, entered the Category base and a wildcard, in the acceptable regex format, and it worked!

    Now I have only one thing left I’d like to cache which eludes me, hence my writing here today. I would like to cache the Searches, as I did with wp-super-cache. I have a rewrite that outputs the search url in the form
    /search/query-term/
    So I tried adding it as an Inclusion
    ^\/search\/.*\/
    and a few other combinations, but still can’t get it to cache the searches.
    I tried generating the search urls with a function instead of htaccess rewrite, still no joy. I even tried doing it without the snippet, running Cache Enabler standard php mode, no difference.

    Any ideas how to cache searches on Cache Enabler?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Is there a particular use case as to why you why searches to be cached? Are you regularly adding new content that might interfere with the cached search results?

    Within the cache_enabler.class.php file, searches are currently set to bypass cache.

    Thread Starter G

    (@gnetworkau)

    I know most would recommend against this, but I use searches as a way of collating related content, similar to how Tags do. Using a plugin like Relevanssi, content may be output based on relevance, using title, excerpt, and tags. So I sometimes use “search links” in the menu or elsewhere to show related content. So when a site is hit by high traffic, it helps to have those searches cached.

    I looked at your file cache_enabler.class.php to get an idea for an override function, but “final class Cache_Enabler” makes it virtually impossible to do. So I edited the file instead, and presto, it worked!

    May I suggest you include code in your next update, that forces Cache Inclusions to override the _bypass_cache() function limitations, at least for is_search(). The bypass defaults are sensible, but it would be nice to have that option.

    Thanks again.

    Thanks for your feedback, I will pass this along to the developers.

    Thread Starter G

    (@gnetworkau)

    Excellent. Ask them to contact me if they need any further feedback/info or for testing.

    At the moment, even though its still a bit “green”, this is the best available disk cache plugin – for simplicity, speed, and so far reliability. I would love to see it go to number 1. Will write a review after I’ve run it a while longer…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cache Searches’ is closed to new replies.