• Hi there,

    I’m trying to setup Output Caching in IIS 7.5 for all php files in WordPress. I was able to make it work but noticed that my admin bar got cached If I was logged in. This would result in all users seeing my version of the first page. I also noticed that when someone searched and the cache expired at the that moment, it would fetch results of the search query and display it as my homepage until the cache expired. I don’t know how to fix this and I feel that I’m very close to get this working.

    We are a school board who get a lot of concurrent users (500 – 1500) when we have bad weather. The server is unable to serve all these people at once.

    My web.config file had this below which I have since removed because of the problems above.

    <add extension=”.php” policy=”CacheForTimePeriod” kernelCachePolicy=”DontCache” duration=”00:00:30″ varyByHeaders=”x-original-url” />

    Does anyone know how to set this up to make it work properly?

    Thank you in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter husdaman

    (@husdaman)

    I think I figured it out. The above line should be
    <add extension=”.php” policy=”CacheForTimePeriod” kernelCachePolicy=”DontCache” duration=”00:00:30″ varyByHeaders=”x-original-url” varyByQueryString=”*” /> in web.config.

    varyByQueryString=”*” was added to the line.

    I haven’t figured out the problem with caching my admin bar yet. I just decided to remove the admin bar for now by putting this in my functions.php file.

    /* Disable WordPress Admin Bar for all users but admins. */
    show_admin_bar(false);

    If anyone has an idea about the admin bar caching please let me know.

Viewing 1 replies (of 1 total)
  • The topic ‘IIS and Output Caching’ is closed to new replies.