* @param capacity maximum number of features to cache
* @param store the cache storage
*/
public GridFeatureCache(SimpleFeatureSource fs, ReferencedEnvelope env, int gridsize, int capacity, Storage store){
super(fs);
tracker = new GridSpatialIndex(CacheUtil.convert(env), gridsize, store, capacity);
this.capacity = capacity;
//lets compare the feature type in the store to the feature type of the current feature source
//if they differ we need to clear the cache as the features have changed.
if (store.getFeatureTypes().size() == 0){