@Override public WritableContentCache get() { return (InMemoryCacheImpl) new InMemoryCacheImpl().setSupportedTypeRepository(getSupportedTypeRepository()); }
@Override public WritableContentCache get() { return (InMemoryCacheImpl) new InMemoryCacheImpl().setSupportedTypeRepository(getSupportedTypeRepository()); }
private void loadOrCreateCache() { Optional<WritableContentCache> optionalCache = persistenceStrategy.load(); if (optionalCache.isPresent()) { setCache(optionalCache.get()); if (getCache() instanceof AbstractStaticSosContentCache && this.cacheFactory instanceof ContentCacheFactoryImpl) { ((AbstractStaticSosContentCache) getCache()).setSupportedTypeRepository( ((ContentCacheFactoryImpl) this.cacheFactory).getSupportedTypeRepository()); } } else { // cache file doesn't exist, try to load cache from datasource setCache(this.cacheFactory.get()); try { update(); } catch (OwsExceptionReport e) { LOGGER.warn("Couldn't load cache from datasource, maybe the datasource isn't configured yet?", e); } } }
private void loadOrCreateCache() { Optional<WritableContentCache> optionalCache = persistenceStrategy.load(); if (optionalCache.isPresent()) { setCache(optionalCache.get()); if (getCache() instanceof AbstractStaticSosContentCache && this.cacheFactory instanceof ContentCacheFactoryImpl) { ((AbstractStaticSosContentCache) getCache()).setSupportedTypeRepository( ((ContentCacheFactoryImpl) this.cacheFactory).getSupportedTypeRepository()); } } else { // cache file doesn't exist, try to load cache from datasource setCache(this.cacheFactory.get()); try { update(); } catch (OwsExceptionReport e) { LOGGER.warn("Couldn't load cache from datasource, maybe the datasource isn't configured yet?", e); } } }