comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.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 b5f4b6073cde
children cc4ec127d666
comparison
equal deleted inserted replaced
1029:a5e0384fe464 1030:c07d9f9a738c
156 156
157 157
158 @Override 158 @Override
159 protected Object getChartResult(String uuid, CallContext callContext) { 159 protected Object getChartResult(String uuid, CallContext callContext) {
160 log.debug("VerticalCrossSectionOutputState.getChartResult"); 160 log.debug("VerticalCrossSectionOutputState.getChartResult");
161 String key = getHash(); 161 String key = getHash(uuid);
162 log.debug("Hash: "+key);
163 162
164 CacheFactory factory = CacheFactory.getInstance(); 163 CacheFactory factory = CacheFactory.getInstance();
165 if (factory.isInitialized()) { 164 if (factory.isInitialized()) {
166 log.info("Using a cachce."); 165 log.info("Using a cachce - key: " + key);
167 Cache cache = factory.getCache(); 166 Cache cache = factory.getCache();
168 167
169 Element element = cache.get(key); 168 Element element = cache.get(key);
170 if (element != null) 169 if (element != null)
171 return element.getObjectValue(); 170 return element.getObjectValue();

http://dive4elements.wald.intevation.org