WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Cached ALL the time? (13 posts)

  1. Strictly Software
    Member
    Posted 3 months ago #

    Since upgrading to WP 3.8 on ONE of my sites that uses WP Super Cache and also uses WP Minify and sits behing Cloudflare I have had problems where the homepage is ALWAYS cached.

    My other site is also on the same Virtual Server, has been upgraded to both 3.8 and new WP Super Cache, but DOESN'T site behind Cloudflare. On this site (which has ALL the same plugins installed at the one that's buggered) is working fine. It's just this one behind Cloudflare (and turning that OFF doesn't seem to help either)

    Even when I am logged in as admin I cannot see the newest articles on the homepage.

    I have turned on the "don't cache pages with a ?querystring=1" option but even when I go to the homepage with ?r=1&blah=1212 I still get articles that were added days ago.

    Even if I hit the "clear cache" button I get all the same articles posted days ago (from the 20th) and I have had 50+ posted since, 20 today.

    What is strange is that on the homepage I don't get any "Edit Page" buttons when I hover over the area they used to appear. It's like the homepage ISN'T recognising me being logged in as admin.

    I have tried turning off all plugins, changing the settings in WP Super Cache but I still get the homepage with old articles.

    I can see from my twitter account that new articles are being posted with links and going on and they appear in order (by date) correctly in admin in the post section.

    Even if I turn off the "caching on" in the easy section I cannot see an updated version of the homepage.

    It's like everything is being cached without me wanting it to be. Only since the new WP version though.

    I have uninstalled the plugin and also changed dates. Checked "sticky" status and ensured known users dont see cached pages etc but I keep getting a cached homepage.

    Even going into Firefox, turning off browser caching and cookies and adding a querystring to make the page unique WITH caching TURNED OFF in WP Super Cache still gives me a cached page.

    All the new posts are accessible from their own links etc but it's like the homepage is physically "locked" and prevented from being overwritten. I have tried this with "extra homepage checks" on and off.

    Even if I go to Cloudflare and "de-activate" the site from passing through Cloudflare (apart from DNS) it still shows me a homepage (with no clickable "edit" buttons when I am logged in as admin) as it did 3 days ago.

    I can view the request/response headers and see the dates, and other timestamps and headers but nothing gives me a clue to why I am getting a cached homepage.

    If I do click from a homepage link to the actual view page I do get "edit" buttons which I can edit. But they just don't appear when I am on the homepage (and logged in as admin) - no theme or code has changed apart from yours and WP's.

    I also have the homepage/frontpage ticked in the "do not cache" section.

    So I am really bemused at what could be going on.

    I don't know if there are any tests or PHP code I could put somewhere to test the system or find out what is going on.

    Something is preventing my homepage from being dynamic even with querystrings that make it unique AND with your "dont cache with a qrystring" option turned on. But I am using all the same settings I had before upgrading to 3.8 but just with this problem.

    Any help would be REALLY appreciated. I know it's XMAS but when you get a chance let me know what i can do. Any MySQL or PHP to add or run would be good as well.

    Thanks

    http://wordpress.org/plugins/wp-super-cache/

  2. Strictly Software
    Member
    Posted 3 months ago #

    By the way when I turn on caching and use the "Cache tester" I get these results

    Test your cached website by clicking the test button below.

    Fetching http://www.darkpolitricks.com/ to prime cache: OK

    Fetching first copy of http://www.darkpolitricks.com/: OK (1.html)

    Fetching second copy of http://www.darkpolitricks.com/: OK (2.html)

    Page 1: 2013-12-20 07:35:18

    Page 2: 2013-12-20 07:35:18

    The timestamps on both pages match!

    So the data is all from thr 20th

    This is AFTER turning the caching OFF and then on again at both WP Super Cache and Cloudflare level. AND forcibly going in re-generating cache stats and deleting ALL cached pages AND having the "delete all cached pages when new post/page is added" option.

    Thanks

  3. Strictly Software
    Member
    Posted 3 months ago #

    And sorry to keep adding things but if I go to page 2 from the homepage eveything works fine - e.g the top part which shows the top 5 articles written by DP are listed in correct order and then the latest articles.

    It seems just that page 1 on the home page listing ALL articles isn't working.

    E.G homepage > http://www.darkpolitricks.com/

    and page 2

    > http://www.darkpolitricks.com/page/2/

    Checking the headers from Page 1 & 2

    Page 1 (notice no caching headers, Pragma no cache etc)

    Date Wed, 25 Dec 2013 19:46:46 GMT
    Last-Modified Fri, 20 Dec 2013 07:35:18 GMT
    Connection keep-alive
    Last-Modified Fri, 20 Dec 2013 07:35:18 GMT
    Content-Encoding gzip

    And Page 2 (no last modified header - but caching headers to NOT cache)

    Date Wed, 25 Dec 2013 19:45:22 GMT
    Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma no-cache

    Content-Encoding gzip

    Sorry to bombard you with info but it seems the homepage isn't getting whatever command it needs to for it not to cache when I want it not to. But page 2 is.

  4. Strictly Software
    Member
    Posted 3 months ago #

    More info - sorry - just so when you get round to looking (if you do) or anyone else does they have it all.

    If I view the source of the page (homepage - page 1) I see at the bottom this

    <!-- Dynamic page generated in 2.328 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2013-12-20 07:35:18 -->
    <!-- super cache -->

    On page 2 however I there is NOTHING in any comment section about caching at all.

    I have turned on the "dont cache homepage" option.

    Also if I use my secret code to NOT Cache a page it doesn't do anything either.

    Also if I de-activate or uninstall WP Super cache and view the source of the home page the comments are still there - that it was created on the 20th by WP Super Cache.

    I have also tried de-activating cloudflare, WP Super cache, WP Minify and WP Widget cache then running the homepage with a randomw querystring on the end ?r=53535 and the page is STILL cached (I have turned OFF all Apache level caching) - plus the comments about WP Super Cache creating the page are still there.

    It is just like I cannot force the homepage to refresh - get reloaded - or not get cached at all - whether I am logged in as admin or a normal user.

    This all happened after an upgrade to latest WP version - should have backed up the code base I know! Prob is another site on same server with same setup is working fine.

    Very odd.

  5. Strictly Software
    Member
    Posted 3 months ago #

    Sorry to add more data.

    I have just fully removed the WP Super Cache plugin - deleted the files, removed the permissions and ensured no .htaccess rules exist.

    I have also paused Cloudflare.

    If I still go to the homepage with a random querystring e.g http://www.darkpolitricks.com/?r=3243423ss I still see in the source at the bottom

    <!-- Dynamic page generated in 2.328 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2013-12-20 07:35:18 -->
    <!-- super cache -->

    Why this is the case when WP Super Cache is not even installed anymore I don't know.

    I have tried turning off my browser cache/cookies/JS/Referers with the web dev bar.

    I've tried going through webproxies and proxies but still get the cached home page.

    It's like the page has been cached then "locked" to prevent further caching OR for the cached page to be cleared and rebuilt.

    How your internals work I don't know but I have found WP 3.8 buggy as hell - especially the click n drag of widgets to their place in sidebars and the hiding of panels, or JS not working to show/hide sections of pages and so on.

    I really need a way to force the clearance of this cached page - do you have a WP Cron job or some internal timer I could check in the DB that forces cache clearance which I could check and then change?

    Any ideas - from anyone would be great. Thanks

  6. Strictly Software
    Member
    Posted 3 months ago #

    Just so you know I have also

    -removed WP Super Cache
    -installed W3 Total Cache
    nothing changed on the home page - page 2 I could see differences in debug etc but the homepage said it was still created by WP Super Cache on the 20th
    -I even tried changing the theme of the site. The homepage stayed the same but all other page changed their theme.

    It's like the homepage has been locked or stuck in memory somewhere. I have turned ALL cloudflare options off, removed all plugins and still WP Super Cache is claiming to have built my homepage.

  7. Strictly Software
    Member
    Posted 3 months ago #

    Right I've solved this major pain in the ass!

    There was a page in the root of my site /public_html/index.htm

    I viewed the source and it was exactly the same source as that of the homepage if I viewed it with the WP Super Cache comments and all the rest of it. The build date was exactly the same as the comments in the site.

    I delete this page and now the site is working again!

    Finally.

    Why this page was cached as static HTML and put in the root of my site I have no idea. The index.php file was there but I guess (just like IIS) that you set a precedence of files to run e.g default.htm, default.asp, index.htm, index.asp etc) and the .htm was top of the list.

    The index.php file is the one all the WP code throws everything through with their massive overkill of PHP instead of adding .htaccess rules into the file to handle /tags/, /category/, /post/date/blah etc. If you actually look at the code that has to run on every page load just to work out what kind of rewritten URL it is - then you will CRY! Why not just take the users settings for permalinks and make .htaccess rules for each major branch.

    Anyway I digress it seems to work for now and if anyone else has the same problem check for an index.htm file in their root and delete it. Whether Super Cache put it there or not I don't know but it buggered me up for 10 days and now its fixed!

  8. Strictly Software
    Member
    Posted 3 months ago #

    I have found the solution.

    I have no idea how WP Super Cache put the file into the root of my site but it created a hardcoded .html file called index.htm under public_html/index.htm

    I am guessing just like IIS Apache has some sort of priority where it runs certain file names first before others e.g

    index.htm
    index.html
    index.php

    Or something similar.

    Once I deleted this hardcoded file from my root everything started working again fine.

    I have no idea how WP Super Cache put it there at 7am on the 20th (a day I was in bed with a hangover) and I have never manually copied the generated source, created a file and copied it up to the site.

    Maybe a check for this would be good. OR maybe it's some feature I don't know about e.g Stephen Fry Lockdown mode for homepage etc. Not that I ever turn it on.

    I just thought I would pass this on.

  9. Emre Vona
    Member
    Posted 3 months ago #

    You should try wp fastest cache.

    http://wordpress.org/plugins/wp-fastest-cache/

  10. Strictly Software
    Member
    Posted 3 months ago #

    What is the difference between WP SUper Cache / W3 Total Cache and this plugin?

    As I know they all create static HTML files for fast loading, with W3 also using DB caching/object caching/minification and so on.

    Do you have some sort of performance chart that shows this plugin & WP Super Cache/W3 Total Cache and performance/response time by load etc?

    Otherwise it just seems like another standard HTML caching program which builds the file once so it's not rebuilt on every page load. Also I can see it says shortcodes can be added to prevent caching but you would also want ALL pages not to be cached for admin or other users (if chosen) without having to edit those pages e.g like WP Super Cacche putting just a ?r=1 querystring on the end.

    Also isn't GZipping by PHP a slow down rather than letting your webserver do it instead?

    Not slating it as I haven't used it but I am just asking for some stats and answers to enable the same use for existing functionality etc. For example if I have a cached page on one of my pages (news) I can add some JS to the top of the page that says "if you are seeing old data click this to see up to date data" and it will just reload the page with a random qrystring on the end to force a non cached page. So I would need that ability.

    Thanks

  11. Jean-Philippe
    Member
    Posted 3 months ago #

    Hi Strictly Software Member,

    I'm so glad I found your topic because I face exactly the same problem! My configuration is WP 3.8, WP Super Cache 1.4, CloudFlare, MaxCDN.

    But I can't find any index.htm file on my root (www) folder :(

  12. Strictly Software
    Member
    Posted 2 months ago #

    Have you tried all of these?
    -adding a random query-string to the end ?r=123123
    -clearing browser-cache
    -restarting Apache
    -rebooting your server
    -checking for other files e.g index.html index.php default.htm etc I don't know what order Apache run these in but you may have a file with a different extension that's hardcoded in the root.
    -use Firefox and HTTP Fox and when you refresh the page check the headers to see if you are being redirected to a file somewhere else e.g 301/302
    -take your .htaccess file and remove all rules (that other plugins INCLUDING WP-Supercache put in) and just leave the WordPress rules at the bottom?

    If it caused by the .htacess rules that WP SuperCache add in then you may have some sort of issue with config. Try re-installing the plugin or check the DB and the wp_options table for any WP SC options.

    Those are all just things I tried but not necessarily in that order which may help you find the cause to the problem.

  13. Jean-Philippe
    Member
    Posted 2 months ago #

    Strictly Software, thank you for your answer.
    I contacted MaxCDN and it seems they finally found a problem with my child theme, preventing connexions with their servers. So I deactivated my child theme and now everything is back to normal.

    Have a good one!

Reply

You must log in to post.

About this Plugin

About this Topic