[Opensymphony-oscache] Re: OSCache and Nutch (open source software)

Sean Dean <[email protected]> Wed, 27 Dec 2006 02:26:55 CST
Newsgroups gmane.comp.java.open-symphony.os-cache
Message-ID <26344058.1167208150297.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
CacheFilter would be set to do the complete page.

The "regular mode" was placing the <cache:cache> and </cache:cache> tags around only a fragment of the page (this was also tried with the complete page for trial and error purposes).

When using CacheFilter, this was my web.xml file:

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<!-- order is very important here -->

<servlet>
  <servlet-name>Cached</servlet-name>
  <servlet-class>org.apache.nutch.servlet.Cached</servlet-class>
</servlet>

<servlet>
  <servlet-name>OpenSearch</servlet-name>
  <servlet-class>org.apache.nutch.searcher.OpenSearchServlet</servlet-class>
</servlet>

<servlet-mapping>
  <servlet-name>Cached</servlet-name>
  <url-pattern>/servlet/cached</url-pattern>
</servlet-mapping>

<servlet-mapping>
  <servlet-name>OpenSearch</servlet-name>
  <url-pattern>/opensearch</url-pattern>
</servlet-mapping>

<welcome-file-list>
  <welcome-file>search.html</welcome-file>
  <welcome-file>index.html</welcome-file>
  <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<taglib>
  <taglib-uri>http://jakarta.apache.org/taglibs/i18n</taglib-uri>
  <taglib-location>/WEB-INF/taglibs-i18n.tld</taglib-location>
 </taglib>

<filter>
  <filter-name>CacheFilter</filter-name>
  <filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
  <init-param>
    <param-name>time</param-name>
    <param-value>2592000</param-value>
  </init-param>
</filter>

<filter-mapping>
  <filter-name>CacheFilter</filter-name>
  <url-pattern>*.jsp</url-pattern>
</filter-mapping>

</web-app>

In both cases, this was my oscache.properties file:

cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener

cache.path=/tmp/oscache

cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache

cache.capacity=1000

cache.unlimited.disk=true
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=55543&messageID=110518#110518