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?
This commit is contained in:
j2blake 2013-05-14 16:37:29 -04:00
parent ddf101d6ae
commit 6123f41d95
5 changed files with 396 additions and 13 deletions

View file

@ -250,6 +250,11 @@
<copyField source="nameRaw" dest="acNameStemmed" />
<copyField source="nameRaw" dest="nameText" />
<!-- nameLowercaseSingleValued is not copied from nameRaw becasue nameRaw might have multiple values -->
<!-- field for hash signature, used for comparing to versions from external caches -->
<field name="etag" type="string" stored="true" indexed="false" multiValued="false" />
<!-- **************************** End Vitro Fields *************************** -->
<!-- **************************** Dynamic Fields *************************** -->

View file

@ -856,18 +856,14 @@
type header if posted in the body. For example, curl now
requires: -H 'Content-type:text/xml; charset=utf-8'
-->
<requestHandler name="/update"
<requestHandler name="/update"
class="solr.XmlUpdateRequestHandler">
<!-- See below for information on defining
updateRequestProcessorChains that can be used by name
on each Update Request
-->
<!--
<!-- Run the etag processor on each update request. -->
<lst name="defaults">
<str name="update.processor">dedupe</str>
<str name="update.processor">etag</str>
</lst>
-->
</requestHandler>
</requestHandler>
<!-- Binary Update Request Handler
http://wiki.apache.org/solr/javabin
-->
@ -1480,6 +1476,23 @@
</updateRequestProcessorChain>
-->
<!-- ETag generation
Creates the "etag" field on the fly based on a hash of all other
fields.
-->
<updateRequestProcessorChain name="etag">
<processor class="solr.processor.SignatureUpdateProcessorFactory">
<bool name="enabled">true</bool>
<str name="signatureField">etag</str>
<bool name="overwriteDupes">false</bool>
<str name="signatureClass">solr.processor.Lookup3Signature</str>
</processor>
<processor class="solr.LogUpdateProcessorFactory" />
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>
<!-- Response Writers
http://wiki.apache.org/solr/QueryResponseWriter