Avoid duplicate cache key calculation

This commit is contained in:
Steffen Schaefer committed 2015-10-16 10:19:44 +02:00
1 parent 094e88ebc8
commit 23b700358e
1 file changed
+1 -1
@@ -95,7 +95,7 @@ public final class CachingDispatch implements DispatchAsync {
} else if (action instanceof HasClientCacheTotalTimeToLive) {
cacheTotalTimeToLiveMillis = ((HasClientCacheTotalTimeToLive) action).cacheTotalTimeToLiveMillis();
}
resultsCache.put(key(clientCacheableAction), new ResultHolder(System.currentTimeMillis()
resultsCache.put(instanceKey, new ResultHolder(System.currentTimeMillis()
+ cacheTotalTimeToLiveMillis, result));
LOG.finest("Added " + instanceKey + " to cache, ttl: " + cacheTotalTimeToLiveMillis + "ms");
if (invalidationTask != null && !invalidationTask.isRunning()) {