Interface CacheKeyPrefix
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
CacheKeyPrefix provides a hook for creating custom prefixes prepended to the actual key stored in
Couchbase.- Since:
- 4.0.0
- Author:
- Christoph Strobl, Mark Paluch, Michael Nitschinger
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionCompute the prefix for the actual key stored in Couchbase.static CacheKeyPrefixCreates aCacheKeyPrefixscheme that prefixes cache keys with the givenprefix.static CacheKeyPrefixsimple()Creates a defaultCacheKeyPrefixscheme that prefixes cache keys withcacheNamefollowed by double colons.
-
Field Details
-
SEPARATOR
-
-
Method Details
-
simple
Creates a defaultCacheKeyPrefixscheme that prefixes cache keys withcacheNamefollowed by double colons. A cache namedmyCachewill prefix all cache keys withmyCache::.- Returns:
- the default
CacheKeyPrefixscheme.
-
prefixed
Creates aCacheKeyPrefixscheme that prefixes cache keys with the givenprefix. The prefix is prepended to thecacheNamefollowed by double colons. A prefixcb-with a cache namedmyCacheresults incb-myCache::.- Parameters:
prefix- must not be null.- Returns:
- the default
CacheKeyPrefixscheme. - Since:
- 4.0.0
-
compute
-