Ard Schrijvers pushed to branch feature/caching-psp1 at cms-community / 
hippo-site-toolkit


Commits:
4229c0b8 by Ard Schrijvers at 2016-12-01T15:37:59+01:00
HSTTWO-3877 extra comment with explanation wrt TTL of the second level cache hit

- - - - -


1 changed file:

- 
components/core/src/main/java/org/hippoecm/hst/cache/ehcache/HstCacheEhCacheImpl.java


Changes:

=====================================
components/core/src/main/java/org/hippoecm/hst/cache/ehcache/HstCacheEhCacheImpl.java
=====================================
--- 
a/components/core/src/main/java/org/hippoecm/hst/cache/ehcache/HstCacheEhCacheImpl.java
+++ 
b/components/core/src/main/java/org/hippoecm/hst/cache/ehcache/HstCacheEhCacheImpl.java
@@ -118,6 +118,8 @@ public class HstCacheEhCacheImpl implements HstCache {
                 // cached entry: When the entry is evicted from the second 
level cache, it also needs to be evicted from the primary cache
                 // because otherwise in a clustered setup, different primary 
caches can start to contain different
                 // cached responses resulting in alternating pages (per 
cluster node) which is not acceptable
+                // Note that when storing an Ehcache Element in the second 
level cache, the second level cache is
+                // responsible for possibly changing the element its 
getTimeToLive() to a proper value, see HSTTWO-3877
                 final long newTTL;
                 if (secondLevelElement.getTimeToLive() == 0) {
                     // the element got a time to live of 0 (never happens 
normally) meaning eternal in primary ehcache. newTTL can also



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/4229c0b8b049401236084a40273759fd1cd246f2
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to