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!
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?
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.
@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 ,
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?
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.
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 😮