Title: Interference with Server Caching
Last modified: October 22, 2018

---

# Interference with Server Caching

 *  Resolved [ashima.goyal](https://wordpress.org/support/users/ashimagoyal/)
 * (@ashimagoyal)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/interference-with-server-caching/)
 * Hello,
 * I am using DreamPress (from Dreamhost) with my wordpress site and I’ve been informed
   by the host that the Photo Gallery plugin is interfering with the server caching
   from DreamPress.
 * “The plugin Photo Gallery is using PHP Sessions which
    interferes with Varnish
   as it is preventing the server side caching from caching the site. Basically,
   that’s keeping the server side caching from doing it’s job in speeding up the
   site.”
 * Can you suggest any settings that would help resort thing?
 * Kind Regards,
    Ashima
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finterference-with-server-caching%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [Photo Gallery Support](https://wordpress.org/support/users/photogallerysupport/)
 * (@photogallerysupport)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/interference-with-server-caching/#post-10803620)
 * Dear Ashima,
 * Please note that, unfortunately, we do not have a standard solution for this.
   However, you can disregard it, if you do not use captcha or do not use Random
   order of the images in galleries. If you have the possibility to force, you can
   do it.
 * Thank you!
 * Have a nice day!
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [7 years, 7 months ago](https://wordpress.org/support/topic/interference-with-server-caching/#post-10804230)
 * > However, you can disregard it
 * Disregard … what? The plugin uses sessions which breaks most serverside caching(
   nginx, Varnish, etc). Is there an option you can turn off in the plugin?
 *  Thread Starter [ashima.goyal](https://wordpress.org/support/users/ashimagoyal/)
 * (@ashimagoyal)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/interference-with-server-caching/#post-10806238)
 * I couldn’t find any option to enable or disable captcha or the use of random 
   images in the Photo Gallery settings. However I did figure out one change in 
   the settings which seems to have worked the problem.
 * Last update:
    I made a change in one of the settings: I had earlier left it on
   default settings, but I found this one setting which was earlier set to No and
   I have now activated it.
 * > Include styles/scripts on gallery pages only
   > Yes No
   >  If this option is enabled, CSS and Javascript files of Photo Gallery
   > will only load on pages with galleries and gallery groups.
 * After the change, the interference with server caching is stopped.
 *  Plugin Contributor [webdorado](https://wordpress.org/support/users/webdorado/)
 * (@webdorado)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/interference-with-server-caching/#post-10810961)
 * [@ashimagoyal](https://wordpress.org/support/users/ashimagoyal/) ,
    Good to hear
   you managed to solve the problem, but “Include styles/scripts on gallery pages
   only” option has nothing to do with PHP Sessions. Honestly, we do not understand
   how that option can affect the server side caching, as it only moves style/scripts
   from header to footer and enqueues only on pages that have galleries.
 * Photo Gallery starts a PHP session only if the comments captcha is On, or the
   order of images is set to random. There is no option to disable sessions, but
   there are options to turn that parts off.
 * [@ipstenu](https://wordpress.org/support/users/ipstenu/) ,
    Please help us understand
   the issue and fix it. So the server side caching stops when any of the plugins
   use a PHP session? So you generally suggest avoiding using sessions? And what
   technology should we use instead, to achieve similar functionality?
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [7 years, 7 months ago](https://wordpress.org/support/topic/interference-with-server-caching/#post-10816549)
 * > So the server side caching stops when any of the plugins use a PHP session?
 * Yes, and so do many plugins. Because PHP sessions say “this is a UNIQUE experience”
   and generally one doesn’t cache that.
 * > Photo Gallery starts a PHP session only if the comments captcha is On, or the
   > order of images is set to random.
 * Frankly, it’s a captcha, which are already defeated by robots, so I would get
   rid of that, and also not set the order to random via a captcha at all but on
   page load via PHP. Yes, people on heavily cached boxes would get a slightly LESS
   random view, but its a tradeoff.
 *  Thread Starter [ashima.goyal](https://wordpress.org/support/users/ashimagoyal/)
 * (@ashimagoyal)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/interference-with-server-caching/#post-10817938)
 * so I was having troubles because of two plugins.. one was dropbox backup (which
   I deleted) and other one was Photo Gallery which I wanted to continue to use 
   so was trying to figure out how I can make it work which is why I started the
   thread.
 * However,
 * My initial settings for
    Show comments on posts is set to No. Could that be the
   reason why captcha option is not there in the first place?
 * And the option for “Order by” in the gallery defaults settings was always set
   to “order” and not random.
 * Apart from changing the “Include style/ scripts on gallery pages”, I changed 
   the setting of ‘Preload images” from No to yes and the number to 5.
 * As of now the plugin is not interfering with server caching and I don’t know 
   what was the solution 😮

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Interference with Server Caching’ is closed to new replies.

 * ![](https://ps.w.org/photo-gallery/assets/icon-256x256.png?rev=2068745)
 * [Photo Gallery by 10Web - Mobile-Friendly Image Gallery](https://wordpress.org/plugins/photo-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/photo-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/photo-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/photo-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/photo-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/photo-gallery/reviews/)

## Tags

 * [Dreampress](https://wordpress.org/support/topic-tag/dreampress/)

 * 6 replies
 * 4 participants
 * Last reply from: [ashima.goyal](https://wordpress.org/support/users/ashimagoyal/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/interference-with-server-caching/#post-10817938)
 * Status: resolved