SqlCacheStrategy
SqlCacheStrategy
Signature
class SqlCacheStrategy implements CacheStrategy {
protected cacheSize = 10_000;
protected ttlProvider: CacheTtlProvider;
constructor(config?: { cacheSize?: number; cacheTtlProvider?: CacheTtlProvider })
protected connection: TransactionalConnection;
protected configService: ConfigService;
init(injector: Injector) => ;
get(key: string) => Promise<T | undefined>;
set(key: string, value: T, options?: SetCacheKeyOptions) => ;
delete(key: string) => ;
invalidateTags(tags: string[]) => ;
}
- Implements:
CacheStrategy
cacheSize
property
ttlProvider
property
CacheTtlProvider
constructor
method
(config?: { cacheSize?: number; cacheTtlProvider?: CacheTtlProvider }) => SqlCacheStrategy
connection
property
configService
property
ConfigService
init
method
(injector: Injector) =>
get
method
(key: string) => Promise<T | undefined>
set
method
(key: string, value: T, options?: SetCacheKeyOptions) =>
delete
method
(key: string) =>
invalidateTags
method
(tags: string[]) =>