From 6123f41d955d96d0274a47a153f70624c43d8a6b Mon Sep 17 00:00:00 2001 From: j2blake Date: Tue, 14 May 2013 16:37:29 -0400 Subject: [PATCH] VIVO-87 First attempt at a caching filter. Appears to work with Firefox cache and Chrome cache, except for language-dependent stuff. Is that because it isn't configured correctly, or is it because Firefox and Chrome aren't attempting to keep more than one version of a page in their caches? Even if they do see a "Vary: Accept-Language" header? --- solr/homeDirectoryTemplate/conf/schema.xml | 5 + .../homeDirectoryTemplate/conf/solrconfig.xml | 31 +- .../webapp/filters/CachingResponseFilter.java | 354 ++++++++++++++++++ .../webapp/utils/solr/SolrResultsParser.java | 8 +- webapp/web/WEB-INF/web.xml | 11 + 5 files changed, 396 insertions(+), 13 deletions(-) create mode 100644 webapp/src/edu/cornell/mannlib/vitro/webapp/filters/CachingResponseFilter.java diff --git a/solr/homeDirectoryTemplate/conf/schema.xml b/solr/homeDirectoryTemplate/conf/schema.xml index b784f33c9..95b616d3e 100644 --- a/solr/homeDirectoryTemplate/conf/schema.xml +++ b/solr/homeDirectoryTemplate/conf/schema.xml @@ -250,6 +250,11 @@ + + + + + diff --git a/solr/homeDirectoryTemplate/conf/solrconfig.xml b/solr/homeDirectoryTemplate/conf/solrconfig.xml index 4c6bca060..bfe0ae889 100644 --- a/solr/homeDirectoryTemplate/conf/solrconfig.xml +++ b/solr/homeDirectoryTemplate/conf/solrconfig.xml @@ -856,18 +856,14 @@ type header if posted in the body. For example, curl now requires: -H 'Content-type:text/xml; charset=utf-8' --> - - - - dedupe + etag - --> - + + @@ -1480,6 +1476,23 @@ --> + + + + true + etag + false + solr.processor.Lookup3Signature + + + + + + + Recognize conditional requests, and generate Cache-Control headers. + Caching Response filter + edu.cornell.mannlib.vitro.webapp.filters.CachingResponseFilter + + + Caching Response filter + /* + + JSession Strip Filter edu.cornell.mannlib.vitro.webapp.filters.JSessionStripFilter