@sourceloop/cache / Exports / RedisCacheStrategy
Class: RedisCacheStrategy<M>¶
Interface defining the component's options object
Type parameters¶
Name |
---|
M |
Implements¶
Table of contents¶
Constructors¶
Properties¶
Methods¶
Constructors¶
constructor¶
• new RedisCacheStrategy<M
>(opts
)
Type parameters¶
Name |
---|
M |
Parameters¶
Name | Type |
---|---|
opts |
CachePluginComponentOptions |
Defined in¶
strategies/redis/redis-cache-strategy.ts:27
Properties¶
cacheProvider¶
• cacheProvider: Redis
= CacheStrategyTypes.Redis
Implementation of¶
Defined in¶
strategies/redis/redis-cache-strategy.ts:22
deletionKey¶
• deletionKey: string
Defined in¶
strategies/redis/redis-cache-strategy.ts:25
getCacheDataSource¶
• getCacheDataSource: () => Promise
<DataSource
>
Type declaration¶
▸ (): Promise
<DataSource
>
Returns¶
Promise
<DataSource
>
Implementation of¶
ICacheStrategy.getCacheDataSource
Defined in¶
strategies/redis/redis-cache-strategy.ts:21
prefix¶
• prefix: string
Implementation of¶
Defined in¶
strategies/redis/redis-cache-strategy.ts:23
ttl¶
• ttl: number
Implementation of¶
Defined in¶
strategies/redis/redis-cache-strategy.ts:24
Methods¶
clearCache¶
▸ clearCache(): Promise
<void
>
Returns¶
Promise
<void
>
Implementation of¶
Defined in¶
strategies/redis/redis-cache-strategy.ts:78
executeRedisCommand¶
▸ executeRedisCommand<T
>(command
, args
): Promise
<undefined
| T
>
Type parameters¶
Name | Type |
---|---|
T |
extends RedisConnectorExecuteReturnType |
Parameters¶
Name | Type |
---|---|
command |
string |
args |
(string | number )[] |
Returns¶
Promise
<undefined
| T
>
Defined in¶
strategies/redis/redis-cache-strategy.ts:88
saveInCache¶
▸ saveInCache(key
, value
): Promise
<void
>
Parameters¶
Name | Type |
---|---|
key |
string |
value |
SaveInCacheValue <M > |
Returns¶
Promise
<void
>
Implementation of¶
Defined in¶
strategies/redis/redis-cache-strategy.ts:59
searchInCache¶
▸ searchInCache(key
): Promise
<SearchInCacheResponse
<M
>>
Parameters¶
Name | Type |
---|---|
key |
string |
Returns¶
Promise
<SearchInCacheResponse
<M
>>