*Deprecated* See https://wiki.duraspace.org/display/VIVODOC/All+Documentation for current documentation

VIVO 1.6 has a built-in cache awareness but VIVO 1.5.2 does not. In order to make use of this feature, one can follow the instructions below to implement cache awareness into VIVO 1.5.2.

Required files

You will need the following files to properly implement the cache awareness.

  1. Add this Java file CachingResponseFilter.java to 

    /vivo-rel-1.5.2-wcmc/vitro-core/webapp/src/edu/cornell/mannlib/vitro/webapp/filters

  2. Add the content of this file addition_to_web.xml.txt to web.xml
  3. Replace /vivo-rel-1.5.2-wcmc/vitro-core/solr/homeDirectoryTemplate/conf/solrconfig.xml by this file:solrconfig.xml
  4. Replace /vivo-rel-1.5.2-wcmc/vitro-core/solr/homeDirectoryTemplate/conf/schema.xml by this file: schema.xml

Deploy.properties

Add the following to deploy.properties:

#
# Tell VIVO to generate HTTP headers on its responses to facilitate caching the 
# profile pages that it creates. 
#
# For more information, see 
# https://wiki.duraspace.org/display/VIVO/Use+HTTP+caching+to+improve+performance
#
# Developers will likely want to leave caching disabled, since a change to a
# Freemarker template or to a Java class would not cause the page to be 
# considered stale.
#

http.createCacheHeaders = true

Deploying the changes

  1. Enable caching in server (e.g. mod_cache)
  2. Stop Tomcat
  3. Run "ant all" to deploy the changes
  4. Start Tomcat
  • No labels