public interface CacheTemplate
| Modifier and Type | Method and Description |
|---|---|
CacheService |
getCacheService()
Returns the underlying cache service used.
|
Object |
getKey(Object... keyElements)
Creates a key from the specified elements
|
<T> T |
getObject(Context context,
CachingOptions cachingOptions,
org.craftercms.commons.lang.Callback<T> callback,
Object... keyElements)
Executes the template, using the specified callback to load the object to cache, if it's not already in the
cache.
|
<T> T |
getObject(Context context,
org.craftercms.commons.lang.Callback<T> callback,
Object... keyElements)
Executes the template, using the specified callback to load the object to cache, if it's not already in the
cache.
|
CacheService getCacheService()
Object getKey(Object... keyElements)
keyElements - the key elements<T> T getObject(Context context, org.craftercms.commons.lang.Callback<T> callback, Object... keyElements)
getObject(org.craftercms.core.service.Context,
org.craftercms.core.service.CachingOptions, org.craftercms.commons.lang.Callback, Object...), but with
default caching options.context - the context (needed by the cache service)callback - the callback to use in case the object is not in the cachekeyElements - the key elements, used to create the final cache key<T> T getObject(Context context, CachingOptions cachingOptions, org.craftercms.commons.lang.Callback<T> callback, Object... keyElements)
context - the context (needed by the cache service)cachingOptions - the options used for caching.callback - the callback to use in case the object is not in the cachekeyElements - the key elements, used to create the final cache keyCopyright © 2018 CrafterCMS. All rights reserved.