|
$webwork.htmlEncode($page.space.name) : Caching
This page last changed on Feb 23, 2007 by cholmes.
Caching with OSCacheGeoServer has a simple plugin that you can install that will set up server-side caching. The tool it uses is called OS Cache. For those seeking a pure java solution this works decently, but we're currently recommending TileCache as the preferred way to do GeoServer caching. See TileCache Tutorial for more information. This page will guide you through setting it up. (note that this is for geoserver 1.4-RC1 and beyond). Step 1: DownloadDownload this file. Step 2: InstallExtract the contents of the file to your WEB-INF folder. The contents of the zip-file are: + classes + oscache.properties + lib + oscache-2.3..2.jar + license.txt When extracted, all files should be under WEB-INF: + WEB-INF
+ classes
+ oscache.properties
+ lib
+ oscache-2.3..2.jar
+ license.txt
Step 3: ConfigureThe last step is to set up your web.xml file. <!-- OSCache configuration. Set time to -1 so the cached responses never expire. Scope should be application. -->
<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>-1</param-value>
</init-param>
<init-param>
<param-name>scope</param-name>
<param-value>application</param-value>
</init-param>
</filter>
<!-- OSCache: cache the output of all WMS responses -->
<filter-mapping>
<filter-name>CacheFilter</filter-name>
<url-pattern>/wms/*</url-pattern>
</filter-mapping>
<!-- OSCache: cache the output of all WFS responses -->
<!-- this is commented out for now as you usually don't benefit much from WFS caching -->
<!--filter-mapping>
<filter-name>CacheFilter</filter-name>
<url-pattern>/wfs/*</url-pattern>
</filter-mapping-->
Save the file and start up the server. More configuration options are available in the oscache.properties file you extracted. Step 4: Enable FeatureType CachingNavigate to the FeatureType editor in the web admin GUI.
That should be it! Further readingOSCache tutorial |
| Document generated by Confluence on Jan 16, 2008 23:27 |