diff --git a/src/main/java/net/helenus/core/HelenusSession.java b/src/main/java/net/helenus/core/HelenusSession.java index 02734b9..2e1fe7f 100644 --- a/src/main/java/net/helenus/core/HelenusSession.java +++ b/src/main/java/net/helenus/core/HelenusSession.java @@ -345,7 +345,9 @@ public class HelenusSession extends AbstractSessionOperations implements Closeab if (pojo == null || pojo == HelenusSession.deleted) { cache.remove(cacheKey); } else { - cache.put(cacheKey, pojo); + if (pojo != null) { + cache.put(cacheKey, pojo); + } } } }