diff --git a/src/main/java/com/irrigation/icl/cache/core/LayeringCache.java b/src/main/java/com/irrigation/icl/cache/core/LayeringCache.java index 4d0d580..5085e7a 100644 --- a/src/main/java/com/irrigation/icl/cache/core/LayeringCache.java +++ b/src/main/java/com/irrigation/icl/cache/core/LayeringCache.java @@ -64,7 +64,7 @@ public class LayeringCache extends RedisCache { Element value = ehCache.get(key); if (value != null) { log.info("Hit Cache L1 (ehcache) :{}={}", key, value); - return (value != null ? new SimpleValueWrapper(value.getObjectValue()) : null); + return new SimpleValueWrapper(value.getObjectValue()); } } Cache.ValueWrapper wrapper = super.get(key); @@ -239,25 +239,25 @@ public class LayeringCache extends RedisCache { layeringL1CacheManager = new CacheManager(configuration); } } - - class MyCopyStrategy implements ReadWriteCopyStrategy { - @Override - public Element copyForWrite(Element value) { - if (value != null) { - Object temp = (Serializable) value.getObjectValue(); - return new Element(value.getObjectKey(), temp); - } - return value; - } - - @Override - public Element copyForRead(Element storedValue) { - if (storedValue != null) { - Object temp = (Serializable) storedValue.getObjectValue(); - return new Element(storedValue.getObjectKey(), temp); - } - return storedValue; - - } - } +// +// class MyCopyStrategy implements ReadWriteCopyStrategy { +// @Override +// public Element copyForWrite(Element value) { +// if (value != null) { +// Object temp = (Serializable) value.getObjectValue(); +// return new Element(value.getObjectKey(), temp); +// } +// return value; +// } +// +// @Override +// public Element copyForRead(Element storedValue) { +// if (storedValue != null) { +// Object temp = (Serializable) storedValue.getObjectValue(); +// return new Element(storedValue.getObjectKey(), temp); +// } +// return storedValue; +// +// } +// } }