Full page caching turned on but page doesn't seem to get retrieved from cache

Permalink
I've turned on "Full Page Caching" to "On - In all cases" under "Cache & Speed Settings" and tested it by clearing cache and loading my home page in a separate browser. But it seems the load time seems to remain the same no matter how many times I refreshed the browser, leading me to believe that the CMS is still going to the DB to retrieve the page, instead of from the cache.

I managed to track the codes down to specifically this bit inside /concrete/src/Cache/Page/PageCache.php

/**
    * Note: can't use the User object directly because it might query the database.
    * Also can't use the Session wrapper because it starts session which triggers
    * before package autoloaders and so certain access entities stored in session
    * will break.
    */
   public function shouldCheckCache(Request $req) {
      $session = \Config::get('concrete.session.name');
      $r = \Cookie::get($session);
      if ($r) {
         return false;
      }
      return true;
   }


If I force this function to always return true, I will find that subsequent reloads of the browser see a much shorter load time, which I believe shows that the page is retrieved from the cache.

The function seems to check if the "CONCRETE5" cookie has been set. If so, then the cache will be ignored. I don't really understand what this all means, so hope someone can help shed some light on whether I'm doing something wrong, or what I should do instead.

Thank you for any help!

MrRonbot
 
BrettDashwood replied on at Permalink Reply
BrettDashwood
Any news on this one?
Jozzeh replied on at Permalink Reply
Jozzeh
This message was also posted on the concrete5 github. A fix has been committed.
See:https://github.com/concrete5/concrete5/issues/3525...