• Resolved twirth5

    (@twirth5)


    Premium Subscriber

    DreamHost support says:

    “I’ve also checked into the site settings and logs to see what else I could recommend to help. There’s a plugin that is setting cookies via PHP sessions, which is causing Varnish not to cache the site. The photo-gallery plugin is setting the cookies, which is causing the site to read a “no-cache” parameter, rather than use Varnish to cache the site.”

    Is there a workaround for this issue that you know of? Meanwhile, I have to deactivate the plug-in.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    It’s in the main constructor file:

      public function __construct() {
        $this->define_constants();
        require_once($this->plugin_dir . '/framework/WDWLibrary.php');
        $this->add_actions();
        if (session_id() == '' || (function_exists('session_status') && (session_status() == PHP_SESSION_NONE))) {
          @session_start();
        }
      }
    

    That checks for, well, PHP sessions on every single page load. PHP Sessions are the enemy of caching, and tell Varnish specifically “This person has a UNIQUE session to my site!” Varnish nods and says “Got your back! No cache for unique visits!”

    Generally it’s recommended you ONLY put sessions in functions that absolutely must have it.

    Plugin Contributor Photo Gallery Support

    (@photogallerysupport)

    Hi,

    @twirth5 please note we will try to find a solution and let you know about it.

    Thank you! Have a nice day!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Photo Gallery and Varnish’ is closed to new replies.