Session variables are getting created unnecessarily for view instances that use the same seed for every user. This is causing Varnish page caching to get bypassed for anonymous users when a system variable alone will suffice. Attached is a patch against 6.x-1.x-dev that only uses session variables when a view requires a different seed per user. The patch allows site builders to use this module without bypassing Varnish page caching provided they don't require different seeds for each user.

CommentFileSizeAuthor
views_random_seed_sessvar.patch3.21 KBaether

Comments

aether’s picture

Status: Active » Needs review
swentel’s picture

Status: Needs review » Needs work

Hmm, this looks pretty much the same as the patch in #1289734: Different content being displayed for different users - also, there's a print statement in your patch.

aether’s picture

Status: Needs work » Closed (duplicate)

Ha! That does indeed look like it does the same thing. I probably didn't find it cuz I was searching for varnish related issues. Ah well. Marking as duplicate of #1289734: Different content being displayed for different users.