Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java @ 1030:c07d9f9a738c
Removed bugs that existed in the caching mechanism (issue264, issue268).
gnv-artifacts/trunk@1067 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 06 May 2010 08:32:56 +0000 |
parents | 4bae3081eb1e |
children | 04967dc9c83f |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java Tue May 04 14:24:23 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontalcrosssection/HorizontalCrossSectionMeshOutputState.java Thu May 06 08:32:56 2010 +0000 @@ -501,15 +501,18 @@ throws StateException { CacheFactory cf = CacheFactory.getInstance(); - String key = getHash(); + String key = getHash(uuid); if (cf.isInitialized()) { + log.debug("Using cache - key: " + key); net.sf.ehcache.Element value = cf.getCache().get(key); if (value != null) { - return (AttributedPoint2ds)value.getObjectValue(); + log.debug("Found element in cache."); + return (AttributedPoint2ds)value.getObjectValue(); } } + log.debug("Not using cache or element not found."); AttributedPoint2ds result = produceResult(callContext); if (result != null && cf.isInitialized()) {