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 CacheKeyPrefix
Creates aCacheKeyPrefix
scheme that prefixes cache keys with the givenprefix
.static CacheKeyPrefix
simple()
Creates a defaultCacheKeyPrefix
scheme that prefixes cache keys withcacheName
followed by double colons.
-
Field Details
-
SEPARATOR
-
-
Method Details
-
simple
Creates a defaultCacheKeyPrefix
scheme that prefixes cache keys withcacheName
followed by double colons. A cache namedmyCache
will prefix all cache keys withmyCache::
.- Returns:
- the default
CacheKeyPrefix
scheme.
-
prefixed
Creates aCacheKeyPrefix
scheme that prefixes cache keys with the givenprefix
. The prefix is prepended to thecacheName
followed by double colons. A prefixcb-
with a cache namedmyCache
results incb-myCache::
.- Parameters:
prefix
- must not be null.- Returns:
- the default
CacheKeyPrefix
scheme. - Since:
- 4.0.0
-
compute
-