public interface SyncCacheCommands
extends io.lettuce.core.dynamic.Commands
RedisCache
.Modifier and Type | Method and Description |
---|---|
Long |
del(byte[]... keys)
Delete one or more keys.
|
void |
expire(byte[] key,
long timeout)
See https://redis.io/commands/pexpire.
|
byte[] |
get(byte[] key)
See https://redis.io/commands/get.
|
List<byte[]> |
keys(byte[] pattern)
Find all keys matching the given pattern.
|
void |
put(byte[] key,
byte[] value)
See https://redis.io/commands/set.
|
void |
put(byte[] key,
byte[] value,
long timeout)
See https://redis.io/commands/set.
|
void |
remove(byte[] key)
See https://redis.io/commands/del.
|
@Command(value="GET :key") byte[] get(@Param(value="key") byte[] key)
key
- The key to retrieve@Command(value="DEL :key") void remove(@Param(value="key") byte[] key)
key
- The key to delete@Command(value="SET :key :value") void put(@Param(value="key") byte[] key, @Param(value="value") byte[] value)
key
- The keyvalue
- The value@Command(value="SET :key :value PX :timeout") void put(@Param(value="key") byte[] key, @Param(value="value") byte[] value, @Param(value="timeout") long timeout)
key
- The keyvalue
- The valuetimeout
- The timeout@Command(value="PEXPIRE :key :timeout") void expire(@Param(value="key") byte[] key, @Param(value="timeout") long timeout)
key
- The key to expiretimeout
- The timeoutLong del(byte[]... keys)
keys
- the keysList<byte[]> keys(byte[] pattern)
pattern
- the pattern type: patternkey (pattern)pattern
.