• WP Super Cache seems to be working great on my site except for my front homepage. If you go to https://www.fatpitchfinancials.com you can see that the homepage is not getting cached by WP Super Cache, but each of my individual posts are. Even my page 2 is getting properly cached. I can’t figure out what to do. I tried turning on and then shutting off “Extra homepage checks. (Very occasionally stops homepage caching) (Recommended),” but that hasn’t made a difference.

    What am I missing or is this a bug? Thank you for any help you can provide.

    https://www.ads-software.com/plugins/wp-super-cache/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter fatpitchfinancials

    (@fatpitchfinancials)

    I have the following settings turned on in WP Super Cache:

    • Cache hits to this website for quick access. Use PHP to serve cache files.
    • Compress pages so they’re served more quickly to visitors.
    • 304 Not Modified browser caching. Indicate when a page has not been modified since last requested.
    • Don’t cache pages for known users.
    • Don’t cache pages with GET parameters. (?x=y at the end of a url)
    • Cache rebuild. Serve a supercache file to anonymous users while a new file is being generated.
    • Cache Timeout 36000
    • Add here strings (not a filename) that forces a page not to be cached. For example, if your URLs include year and you dont want to cache last year posts, it’s enough to specify the year, i.e. ’/2004/’. WP-Cache will search if that string is part of the URI and if so, it will not cache that page.
      wp-.*\.php
      index\.php
    • Add here those filenames that can be cached, even if they match one of the rejected substring specified above.
      wp-comments-popup.php
      wp-links-opml.php
      wp-locations.php

    Everything seems to be working well except I can’t seem to get WP Super Cache to work on my homepage. Any suggestions?

    I have similar settings, basically the default plus some of the recommended.
    Preload will generate a cached version of all pages except the home page. The home page is set from Reading -> Static front page. If I don’t set it to static front page, it’s OK…

    Is that an intended behavior of preload? It does seem normal caching occurs to the homepage too, but I’d like it to be preloaded along with all other pages.

    I’ve tracked the problem to the following line in wp-cache.php

    if ( $page_on_front != 0 && ( $post_id == $page_on_front || $post_id == $page_for_posts ) )
    continue;

    Coming from revision:
    https://plugins.trac.www.ads-software.com/browser/wp-super-cache/trunk/wp-cache.php?rev=505635

    Obviously this is intentional. From the revision on trac and the support thread I don’t understand why this is really necessary. It works for me fine so far by just commenting out those lines.
    Am I missing anything here? I most definitely believe I want all pages including the front page to be preloaded.

    Thread Starter fatpitchfinancials

    (@fatpitchfinancials)

    Great work fuoco20!

    So far I haven’t been able to get WP Super-cache to touch my homepage. I set my WordPress to “Front page displays: Your latest posts” under Settings->Reading. I tried to reset my Reading settings, but that made no difference.

    I’ll test commenting out those 2 lines you pointed out later tonight. However, I can’t believe this has been in the code for 3 years and is not impacting other sites. In the meantime, it would be really nice if the developer would comment on this thread about what we are observing.

    To be clear, this is supposed to be affecting only a situation where you use a static page as front page (in Settings -> Reading)

    I’m still suffering from a problem where everything gets preloaded every now and again – much sooner that set to be. But I still don’t know if it’s related to those lines or just wp-cron behaving.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Homepage not getting cached’ is closed to new replies.