Spatial Engine Cache

This is a virtual spatial engine that provides caching for other spatial engines.

Available from Weave 2.6.4.

Namespace

urn:com.cohga.server.spatial.geotools#1.0

Tags

spatialengine

Properties

Name

Type

Required

Description

Name

Type

Required

Description

id

string

yes

Unique identifier

dbtype

‘cache’

yes

The name of the driver to use, in this case “cache”

datasource

string

yes

The id of the spatial engine that will provide the data for this spatail engine

maxAgeSeconds

integer

no

How may seconds should the data in the cache be kept for before it is re-fetched from the source spatial engine.

If this is not set then the data will be read once when first accessed and not updated after that.

autoRenew

boolean

no

Should the data be fetched periodically in the background?

If this is set to false the underlying data will be re-fetched at the time it’s access if it is older than maxAgeSeconds seconds old.

If this isn’t set or is set to true then the data will be periodically be checked if it is older than mapAgeSeconds seconds old and re-fetched and replace the existing cached data.

evictorPeriodicitySeconds

integer

no

The number of seconds to wait between background checks to see if data is exposed, default is 300 seconds.

evictorParallellism

integer

no

The number of expired layers to fetch at one from the server during a background load when the data has expired, default is 1.

Sub-tags

None

Content

None

Examples

<!-- create the source for the data to be cached in this case we're using an WFS service --> <spatial:spatialengine id="spatialengine.wfsng.source">     <dbtype>wfs-ng</dbtype>     <url><![CDATA[http://vmrunout:8080/geoserver/ows]]></url>     <protocol>get</protocol>     <username>username</username>     <password>password</password>     <timeout>60000</timeout>     <buffersize>100000</buffersize>     <gzip>false</gzip>     <lenient>true</lenient> </spatial:spatialengine> <!-- create the cache referring to the WFS spatial engine this is what you should refer in the rest of the config --> <spatial:spatialengine id="spatialengine.wfsng> <dbtype>cache</dbtype> <datasource>spatialengine.wfsng.source</datasource> <maxAgeSeconds>3600</maxAgeSeconds> </spatial:spatialengine>