public class AlwaysValidCacheEntryValidity extends Object implements ICacheEntryValidity
Simple implementation of ICacheEntryValidity
that considers the template resolution to be always cacheable
and always valid.
This means that a cache entry for this template resolution would only be evicted by the effect of LRU (being the least-recently used entry).
Modifier and Type | Field and Description |
---|---|
static AlwaysValidCacheEntryValidity |
INSTANCE
Singleton instance.
|
Constructor and Description |
---|
AlwaysValidCacheEntryValidity() |
Modifier and Type | Method and Description |
---|---|
boolean |
isCacheable()
Returns true.
|
boolean |
isCacheStillValid()
Returns true.
|
public static final AlwaysValidCacheEntryValidity INSTANCE
Singleton instance. Meant to avoid creating too many objects of this class.
public boolean isCacheable()
Returns true. Templates are always considered cacheable using this validity implementation.
isCacheable
in interface ICacheEntryValidity
public boolean isCacheStillValid()
Returns true. Template cache entries using this validity are always considered valid, and thus only evicted from cache by LRU.
isCacheStillValid
in interface ICacheEntryValidity
Copyright © 2016 The THYMELEAF team. All rights reserved.