• Resolved zapappa

    (@lesarnott)


    I was pleased to find the advice below regarding enabling cached pages for URLs with query parameters but I don’t see those web pages being created. After editing wp-config.php I have tried just requesting the page several times and I tried running a manual cron job but no luck. Is there some thing else I have to do in order to trigger caching the URL+querystring pages?

    “If you want to enable cache system for the urls which contain querystring, you need to add the following rule into the top of wp-config.php file.”

    define(‘WPFC_CACHE_QUERYSTRING’, true);

    • This topic was modified 4 years, 1 month ago by zapappa.
Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Emre Vona

    (@emrevona)

    you need to add the following line after <?php which exists at the top of wp-config.php file.

    Thread Starter zapappa

    (@lesarnott)

    Thanks for getting back but like I said I’ve already edited wp-config.php to include define(‘WPFC_CACHE_QUERYSTRING’, true);. Are you talking about something else?

    Plugin Author Emre Vona

    (@emrevona)

    sometimes it does not work when it is added at the bottom of the page so you need to add the following line after <?php which exists at the top of wp-config.php file.

    Thread Starter zapappa

    (@lesarnott)

    Hi Emre

    All my fault I think. I moved the WPFC_CACHE_QUERYSTRING line up and tried again. I still didn’t see any new files in the cache but I checked the page source in Chrome and sure enough at the bottom was the cache file creation indication (see below). Then I moved the querystring line back further down and it worked just fine, so I’m guessing it was working fine the first time – I just didn’t know it.

    My (perception) problem was that although the cached response time is faster it is not the lightening speed that the regular page cache produces. I guess that made me think it wasn’t being cached. It is faster but I understand that it uses php code and not the mod_rewrite and is therefore slower. I’m on a shared host so un-cached pages can be slow anyway.

    So, thank you very much and, if you have time, could you please describe what happens with the caching of “query string pages” and why there doesn’t seem to be a corresponding cache page in cache/all ?

    <!– WP Fastest Cache file was created in 1.9958560466766 seconds, on 10-03-20 12:05:31 –>
    <!– via php –>

    • This reply was modified 4 years, 1 month ago by zapappa.
    Plugin Author Emre Vona

    (@emrevona)

    the cache is saved into /cache/all/ folder surely. can you tell me a sample url please?

    Thread Starter zapappa

    (@lesarnott)

    https://www.fridayharborsailing.com/calendar/calendar-races/ and go down to May 16 Single Handed Race and then click on list or info.

    I don’t see any cache file/folders created in the past few minutes. What would the folder/file names format be for cached querystring pages?

    Thread Starter zapappa

    (@lesarnott)

    I’m thinking this has to do with the admin exclude rule. If the URL contained admin would that no-op the querystring page caching? I’ll take a look and get back to you.

    Exclude CookiesAdd New Rule
    Contains: Admin
    Caching has been disabled for Admin users

    • This reply was modified 4 years, 1 month ago by zapappa.
    Thread Starter zapappa

    (@lesarnott)

    Yes, that was it. A redirect was taking place because there was no ‘/’ in front of the query ‘?’ which caused a redirect including ‘admin’. That’s all fixed on my side and now I see the the cache folders such as ‘info’, containing several variants of the querystring (which looks very elegant).

    However the load time time is still over 3 seconds on these pages, probably due to my ISP. Just for a test I copied a cached querystring ‘index.html’ to /wp-content/cache/all/info/test/ and navigated to it in the browser. It loaded very fast without the 3 second delay.

    I couldn’t do this test directly from the /wp-content/cache/all/info/?row_id=674 folder because the ‘/?’ in the folder name would obviously be treated as a query string.

    In summary, all is working as designed but is there anything I can do to speed up these ‘querystring’ cached pages?

    Plugin Author Emre Vona

    (@emrevona)

    can you tell me a sample url with query string pleae?

    Thread Starter zapappa

    (@lesarnott)

    Thread Starter zapappa

    (@lesarnott)

    The link I sent is being held for moderation. Let’s see if plain text makes it through…

    https://www.fridayharborsailing.com/info/?row_id=671

    • This reply was modified 4 years, 1 month ago by zapappa.
    • This reply was modified 4 years, 1 month ago by zapappa.
    Thread Starter zapappa

    (@lesarnott)

    I’ve said before that I’m on a shared host so un-cached pages can be slow anyway. I have to stay below an average of 2% cpu usage – otherwise responses are purposely delayed and I think that is what is happening here.

    Plugin Author Emre Vona

    (@emrevona)

    The page has been cached as on the following screenshot.
    https://i.hizliresim.com/9ZME2v.jpg

    Thread Starter zapappa

    (@lesarnott)

    I think we are out of sync, I already said:

    “That’s all fixed on my side and now I see the the cache folders such as ‘info’, containing several variants of the querystring (which looks very elegant).”

    “However the load time time is still over 3 seconds on these pages, probably due to my ISP.”

    “In summary, all is working as designed but is there anything I can do to speed up these ‘querystring’ cached pages?”

    So, I think you might as well close this issue. Also can you please remove our URL from the above messages?

    Plugin Author Emre Vona

    (@emrevona)

    “In summary, all is working as designed but is there anything I can do to speed up these ‘querystring’ cached pages?”

    the cache is served via PHP instead of Apache so it may be slow but it is related with your hosting provider %100. You can change your hosting provider. On the wp fastest cache side there is no problem.

    So, I think you might as well close this issue. Also can you please remove our URL from the above messages?

    Yes, you can.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘WPFC CACHE QUERY STRING’ is closed to new replies.