@FunctionalInterface public interface CacheKeyPrefix
CacheKeyPrefix provides a hook for creating custom prefixes prepended to the actual key stored in
Couchbase.| Modifier and Type | Field and Description |
|---|---|
static String |
SEPARATOR
Default separator.
|
| Modifier and Type | Method and Description |
|---|---|
String |
compute(String cacheName)
Compute the prefix for the actual key stored in Couchbase.
|
static CacheKeyPrefix |
prefixed(String prefix)
Creates a
CacheKeyPrefix scheme that prefixes cache keys with the given prefix. |
static CacheKeyPrefix |
simple()
Creates a default
CacheKeyPrefix scheme that prefixes cache keys with cacheName followed by double
colons. |
static final String SEPARATOR
static CacheKeyPrefix simple()
CacheKeyPrefix scheme that prefixes cache keys with cacheName followed by double
colons. A cache named myCache will prefix all cache keys with myCache::.CacheKeyPrefix scheme.static CacheKeyPrefix prefixed(String prefix)
CacheKeyPrefix scheme that prefixes cache keys with the given prefix. The prefix is
prepended to the cacheName followed by double colons. A prefix cb- with a cache named
myCache results in cb-myCache::.prefix - must not be null.CacheKeyPrefix scheme.Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.