Package org.thymeleaf.cache
Class AlwaysValidCacheEntryValidity
Object
org.thymeleaf.cache.AlwaysValidCacheEntryValidity
- All Implemented Interfaces:
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).
- Since:
- 1.0
- Author:
- Daniel Fernández
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true.boolean
Returns true.
-
Field Details
-
INSTANCE
Singleton instance. Meant to avoid creating too many objects of this class.
-
-
Constructor Details
-
AlwaysValidCacheEntryValidity
public AlwaysValidCacheEntryValidity()
-
-
Method Details
-
isCacheable
public boolean isCacheable()Returns true. Templates are always considered cacheable using this validity implementation.
- Specified by:
isCacheable
in interfaceICacheEntryValidity
- Returns:
- true
-
isCacheStillValid
public boolean isCacheStillValid()Returns true. Template cache entries using this validity are always considered valid, and thus only evicted from cache by LRU.
- Specified by:
isCacheStillValid
in interfaceICacheEntryValidity
- Returns:
- true
-