Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The above constructor makes use of the bounds of the featureSource for determing the bounds of the cache.  If you wish to provide your own bounds for the cache you can do so using the following:

Code Block
FeatureCache cachingFS = new StreamingGridFeatureCache(featureSource, bounds, indexcapacity, featurecapacity, storage);

Re-using the Cache

A cache store can be re-used and providing the feature types are the same the features from the store will be used.  For example if you are using this within uDig; cache a bunch of WFS features; restart uDig; the feature cache will still be used to serve up features.

Clearing the Cache

Currently there is no policy for checking if features in the cache are valid.  Features in the cache do not expire.  However the feature cache does listen to feature events and if a feature is added or removed from the cache the nodes that correspond to that feature event are invalidated and cleared.  (Thus next time features from those nodes are requested it will pass the request along to the original feature source). 

The cache can be cleared manually using:

Code Block