Varnish missing on Views Exposed Filters

Events happening in the community are now at Drupal community events on www.drupal.org.
tomhung's picture

Vanish will "miss" on a view with exposed filters.

It sets the NO_CACHE=Y cookie.

NOTE: i'm sure if this comment should go here or in pressflow.

Comments

according to

tomhung's picture

according to https://wiki.fourkitchens.com/pages/viewpage.action?pageId=13828781 the cookie is set by the cookie_cache_bypass module.

Umm ... right?

gchaix's picture

Unless I'm not understanding your issue properly, you don't want Varnish to cache views with exposed filters. If they're cached you're going to have some very frustrated users when they try to change a filters and keep getting the cached (unaltered) page back again.

-Greg

Disagree

bibo's picture

...you don't want Varnish to cache views with exposed filters.

Why shouldn't he want the result pages (ajax or non-ajax) to be cached? The exposed filters are sent as GET-params, which means each search etc is saved in its own cache entry (with default vcl hash conf).

Makes sense to me, unless the searches would be scattered across too widely (filling the cache with unused entries).

but if filters are optional

tomhung's picture

but if filters are optional and the default of no filter is chosen then it should server the cached version.

example:
http://10.3.58.158/empdirectory/phonebook
shows a table with all the values
has 2 exposed filters (value_3=>office, and value_4=>status)
* I would like this cached because its has 400+ rows and takes 6-10s to render

http://10.3.58.158/empdirectory/phonebook?value_3=Alaska+Office&value_4=All
this is a filtered url based on the exposed filters
* this should not be cached

Mercury

Group organizers

Group categories

Post Type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: