CacheProvider
CacheProvider
new CacheProvider()
Methods
public clear(): Promise<void>
public delete(key): Promise<void>
| Parameter | Type | Optional |
|---|---|---|
| key | string | ❌ |
public exists(key): Promise<boolean>
| Parameter | Type | Optional |
|---|---|---|
| key | string | ❌ |
public expire(key, ttl): Promise<void>
| Parameter | Type | Optional |
|---|---|---|
| key | string | ❌ |
| ttl | number | ❌ |
public get(key): Promise<undefined | CacheEntry<T>>
| Parameter | Type | Optional |
|---|---|---|
| key | string | ❌ |
public set(key, value, ttl?): Promise<void>
| Parameter | Type | Optional |
|---|---|---|
| key | string | ❌ |
| value | T | ❌ |
| ttl | number | ✅ |