This documentation relates to an old version of VIVO, version 1.9.x. Looking for another version? See all documentation.
As a VIVO implementation grows in size and tracks more and more scholarly activity, profile pages can be pulling in hundreds of relationships to render the page, which results in more data being retrieved from the underlying triple store and longer page load times. For example, a profile page for a faculty member with hundreds of publications, which isn't uncommon, can lead to multiple second page loads.
Instead of querying the database each time a page is loaded, a cached version of the page can be served, provided the user is not logged in. VIVO supports HTTP caching directly. To enable, uncomment the "http.createCacheHeaders = true" line in runtime.properties:
VIVO will now generate eTags for caching, which are stored in VIVO's Solr index. More information is available from Ted Lawless, who originally demonstrated the eTag method, here.
Next, enable mod_cache in Apache by uncommenting LoadModule lines in httpd.conf:
and adding the following configuration lines to httpd.conf or in its own .conf file within Apache's conf.d directory:
The above configuration was provided by Ted Lawless. Restart Apache and Tomcat. Large pages should now load significantly faster for logged-out users.
You can verify http caching is occurring by looking in the directory specified as CacheRoot and seeing if files are being added. You can also use your browser's debugging tools, like Firebug or Chrome debug tools, to inspect the HTTP status code of the response for a profile page. In Chrome, enable Developer Tools (View > Developer > Developer Tools, or ⌥⌘I) and select 'Network' on the pane that appears. Cached pages will return a 304 "Not Modified" response.