Update of /cvsroot/opensymphony/website/web/oscache
In directory sc8-pr-cvs1:/tmp/cvs-serv8165/web/oscache
Modified Files:
filter.jsp
Log Message:
Fixed a couple of problems with the documentation of the scope parameter
Index: filter.jsp
===================================================================
RCS file: /cvsroot/opensymphony/website/web/oscache/filter.jsp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- filter.jsp 27 Jul 2003 14:33:43 -0000 1.1
+++ filter.jsp 4 Aug 2003 17:12:08 -0000 1.2
@@ -1 +1 @@
-<html>
<head>
<title>Caching Content with the CacheFilter</title>
</head>
<body bgcolor="#FFFFFF">
<p><b>OSCache</b> comes with a servlet filter that enables you to transparently cache entire pages
of your website, and even binary files. Caching of binary files is extremely useful when they are
generated dynamically, eg PDF files or images.</p>
<p>To configure the filter, add something like the following to your web.xml file (obviously you
will want to set the URL pattern to match only the content you want to cache; this example will
cache all JSP pages):
<pre><code>
<filter>
<filter-name>CacheFilter</filter-name>
<filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CacheFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
</code></pre>
<p>The default duration is one hour and the default scope for the cache is application scope. You
can change these settings using initialization parameters. The <code>time</code> parameter sets
the cache time (in seconds), while the <code>scope</code> parameter lets you set the scope. Valid
values for the scope are <code>application</code>, <code>session</code>, <code>request</code> and
<code>page</code>.</p>
<p>As an example, the following settings would cache content for 10 minutes in session scope:
<pre><code>
<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>600</param-value>
</init-param>
<init-param>
<param-name>scope</param-name>
<param-value>application</param-value>
</init-param>
</filter>
</code></pre></p>
<p>Note that the filter will only cache content that has a status of 200 (<code>HttpServletResponse.SC_OK</code>).</p>
<%@ include file="navpanel.jsp" %>
</body>
</html>
\ No newline at end of file
+<html>
<head>
<title>Caching Content with the CacheFilter</title>
</head>
<body bgcolor="#FFFFFF">
<p><b>OSCache</b> comes with a servlet filter that enables you to transparently cache entire pages
of your website, and even binary files. Caching of binary files is extremely useful when they are
generated dynamically, eg PDF files or images.</p>
<p>To configure the filter, add something like the following to your web.xml file (obviously you
will want to set the URL pattern to match only the content you want to cache; this example will
cache all JSP pages):
<pre><code>
<filter>
<filter-name>CacheFilter</filter-name>
<filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CacheFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
</code></pre>
<p>The default duration is one hour and the default scope for the cache is application scope. You
can change these settings using initialization parameters. The <code>time</code> parameter sets
the cache time (in seconds), while the <code>scope</code> parameter lets you set the scope. Valid
values for the scope are <code>application</code> and <code>session</code>.</p>
<p>As an example, the following settings would cache content for 10 minutes in session scope:
<pre><code>
<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>600</param-value>
</init-param>
<init-param>
<param-name>scope</param-name>
<param-value>session</param-value>
</init-param>
</filter>
</code></pre></p>
<p>Note that the filter will only cache content that has a status of 200 (<code>HttpServletResponse.SC_OK</code>).</p>
<%@ include file="navpanel.jsp" %>
</body>
</html>
\ No newline at end of file
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.