• Resolved ascom

    (@ascom)


    The Falcon engine does a great job at making my site’s response times fast, but it doesn’t seem to be caching the home page, which is the page that is visited the most often.

    Why isn’t it caching the homepage? I see the file for the homepage in the cache directory, but the server still responds in ~200 ms, which is usual for a non-cached page (it’s a good dedicated server, in case you are wondering why it is so “fast”). All other pages, like /blog/, /contact/, /2014/04/, etc, respond in ~50 ms.

    https://www.ads-software.com/plugins/wordfence/

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter ascom

    (@ascom)

    bump

    Plugin Author Wordfence Security

    (@mmaunder)

    Hi,

    You can enable an option on performance setup that will put a footer into your HTML source indicating if the page was cached. Enable this, save, clear the cache, then check the home page footer to tell if it’s cached or not.

    Regards,

    Mark.

    Thread Starter ascom

    (@ascom)

    The comment at the bottom doesn’t even appear on the homepage, but does appear on /blog/.

    Is your homepage part of WordPress? With a URL of /blog/, it sounds like WordPress may be a subdirectory.

    Thread Starter ascom

    (@ascom)

    The homepage is part of WordPress.

    Now I’m just guessing…
    WF Caches are recalled via .htaccess. Since you say the cached file exists, it makes me think something in .htaccess is preventing this. Granted, I don’t have the footer turned on so I can’t verify that *mine* is working.

    1) Check the WordFence Performance Setup for any Cache Exclusions
    2) Back up your .htaccess file, then turn off Falcon Engine. Delete .htaccess and rebuild it from scratch (Mine only contains the Permalinks section and WF’s bit). To rebuild mine, I’d revisit my WordPress Permalink option, then save, then enable Falcon Engine.

    Thread Starter ascom

    (@ascom)

    I suspect that Apache 2.4 is what’s causing it. I’ve already tried disabling my sections of the htaccess (such as “Rickroll Attackers”), but it still isn’t serving the homepage cached.

    Thread Starter ascom

    (@ascom)

    Okay, I’ve disabled Falcon Engine, and when I try to enable it, it thinks I’m using Nginx + PHP-FPM, even though I’m using Apache + PHP-FPM. This isn’t working!

    Thread Starter ascom

    (@ascom)

    I finally got it to recognize Apache by modifying the is_nginx() function. (I don’t think all fpm_fcgi users are on nginx!)

    However, it still isn’t caching the homepage, even with all of my garbage deleted from the htaccess. What is going on? (also, I’m testing the cache in an incognito mode window, so I’m not logged in)

    Thread Starter ascom

    (@ascom)

    bump

    The dev team is actively looking into this.

    tim

    Plugin Author Wordfence Security

    (@mmaunder)

    Hi @ascom,

    I’ve filed a bug to investigate this. We’re going to set up Apache/PHP-FPM in the lab and try to determine what the issue is. If you could post your .htaccess here if it doesn’t have any sensitive info in it or email it to me at mark @wordfence I’d appreciate it.

    Thanks.

    Thread Starter ascom

    (@ascom)

    Here is my htaccess, annotated for maximum understanding and funness: https://gist.github.com/as-com/e5cf2ab740bd7c7af0bf

    EDIT: Server details
    PHP-FPM 5.5.9-1ubuntu4.4
    Apache 2.4.7-1ubuntu4

    Plugin Author Wordfence Security

    (@mmaunder)

    OK I read it and don’t see anything that’s incompatible with what we’re doing.

    Will take a look at PHP-FPM on apache with falcon and do some testing.

    Regards,

    Mark.

    I encountered this issue as well, and have narrowed it down to this Apache bug:

    https://bz.apache.org/bugzilla/show_bug.cgi?id=53929

    Related:

    https://bz.apache.org/bugzilla/show_bug.cgi?id=56434
    https://stackoverflow.com/questions/20023601/internal-url-rewrite-no-longer-working-after-upgrading-apache-to-2-4
    https://stackoverflow.com/questions/17095981/why-apache-mod-rewrite-rewrites-twice-my-url?rq=1

    There doesn’t seem to be an .htaccess workaround that will help with this issue. However, I worked around the problem by modifying WordPress’s index.php file, adding logic which mimics the logic Falcon adds to the .htaccess, but just checks if there is a cache file for “/”. Slight performance hit, but still much better than firing up WP.

    Also, one of the provided links mentions that moving the logic to the vhost file might resolve the issue. I did not try this.

    FYI Mark, I’ve already talked with Matt about the issue.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Falcon Engine not caching homepage’ is closed to new replies.