diff gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java @ 1060:cc4ec127d666

Remove the elements of an outdated state from cache if its endOfLife method is called. gnv-artifacts/trunk@1143 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 01 Jun 2010 16:54:21 +0000
parents c07d9f9a738c
children f953c9a559d8
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java	Mon May 31 08:20:17 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/OutputStateBase.java	Tue Jun 01 16:54:21 2010 +0000
@@ -209,7 +209,7 @@
             // we use a cache
             log.info("Using cache.");
             Cache cache = factory.getCache();
-            String key  = "chart_" + getHash(uuid);
+            String key  = "chart_" + getHash();
 
             net.sf.ehcache.Element value = cache.get(key);
             if (value != null) {
@@ -242,7 +242,7 @@
         log.debug("Fetch chart [" + uuid + "] from cache");
         CacheFactory cacheFactory = CacheFactory.getInstance();
         if (cacheFactory.isInitialized()) {
-            String key = "chart_" + getHash(uuid);
+            String key = "chart_" + getHash();
             net.sf.ehcache.Element object = cacheFactory.getCache().get(key);
 
             if (object != null) {
@@ -302,7 +302,7 @@
     protected void removeChartResult(String uuid) {
         log.debug("OutputStateBase.getChartResult");
         if (CacheFactory.getInstance().isInitialized()) {
-            String key = "chart_" + getHash(uuid);
+            String key = "chart_" + getHash();
             log.debug("Hash for Queryelements: " + key);
             net.sf.ehcache.Element value = CacheFactory.getInstance().getCache().get(key);
             if (value != null) {
@@ -321,7 +321,7 @@
 
         CacheFactory cacheFactory = CacheFactory.getInstance();
         if (cacheFactory.isInitialized()) {
-            String key = "chart_" + getHash(uuid);
+            String key = "chart_" + getHash();
             net.sf.ehcache.Element object = cacheFactory.getCache().get(key);
             if (object != null)
                 cacheFactory.getCache().remove(key);
@@ -335,7 +335,7 @@
         log.debug("Prufify chart [" + uuid + "]");
         CacheFactory cacheFactory = CacheFactory.getInstance();
         if (cacheFactory.isInitialized()) {
-            String key = "chart_" + getHash(uuid);
+            String key = "chart_" + getHash();
             cacheFactory.getCache().put(new net.sf.ehcache.Element(key, chart));
         }
     }

http://dive4elements.wald.intevation.org