Class SuffixCacheInvalidator<K extends String,V>
java.lang.Object
org.craftercms.studio.impl.v2.utils.cache.SuffixCacheInvalidator<K,V>
- Type Parameters:
K- the type for the keysV- the type for the values
- All Implemented Interfaces:
CacheInvalidator<K,V>
public class SuffixCacheInvalidator<K extends String,V>
extends Object
implements CacheInvalidator<K,V>
Implementation of
CacheInvalidator that appends a suffix to the key- Since:
- 4.0
- Author:
- joseross
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinvalidate(com.google.common.cache.Cache<K, V> cache, K key) Performs the cache invalidation based on the given keyvoidsetSeparator(String separator)
-
Field Details
-
DEFAULT_SEPARATOR
The default separator for the suffix- See Also:
-
separator
The separator for the suffix -
suffix
The suffix to append
-
-
Constructor Details
-
SuffixCacheInvalidator
-
-
Method Details
-
setSeparator
-
invalidate
Description copied from interface:CacheInvalidatorPerforms the cache invalidation based on the given key- Specified by:
invalidatein interfaceCacheInvalidator<K extends String,V> - Parameters:
cache- the cache instancekey- the key to invalidate
-