public interface ICacheEntryValidity
Common interface for all objects defining the validity of a template resolution.
These objects are queried by the Template Cache for knowing whether a template is cacheable or not, and also for determining if an existing cache entry is still valid.
A typical implementation is TTLCacheEntryValidity
,
which determines the validity of a cache entry based on a TTL (time-to-live).
Modifier and Type | Method and Description |
---|---|
boolean |
isCacheable()
Returns whether the template resolution can be included into the cache
or not.
|
boolean |
isCacheStillValid()
Returns whether this template resolution is still valid or not (and therefore
its corresponding cache entry.
|
boolean isCacheable()
Returns whether the template resolution can be included into the cache or not.
boolean isCacheStillValid()
Returns whether this template resolution is still valid or not (and therefore
its corresponding cache entry. Will only be ever called if
isCacheable()
returns true.
This method will be called by the Parsed Template Cache before returning a cache entry, so that it can be invalidated if needed, and so trigger a new template resolution operation.
Copyright © 2016 The THYMELEAF team. All rights reserved.