import { RedisQueryResultCache } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/cache/RedisQueryResultCache.ts";
Caches query result into Redis database.
Methods
protected
deleteKey(key: string): Promise<void>Removes a single key from redis database.
protected
loadRedis(): anyLoads redis dependency.
clear(queryRunner?: QueryRunner): Promise<void>
Clears everything stored in the cache.
connect(): Promise<void>
Creates a connection with given cache provider.
disconnect(): Promise<void>
Disconnects the connection
getFromCache(options: QueryResultCacheOptions, queryRunner?: QueryRunner): Promise<QueryResultCacheOptions | undefined>
Caches given query result. Returns cache result if found. Returns undefined if result is not cached.
isExpired(savedCache: QueryResultCacheOptions): boolean
Checks if cache is expired or not.
remove(identifiers: string[], queryRunner?: QueryRunner): Promise<void>
Removes all cached results by given identifiers from cache.
storeInCache(): Promise<void>
options: QueryResultCacheOptions,
savedCache: QueryResultCacheOptions,
queryRunner?: QueryRunner,
Stores given query result in the cache.
synchronize(queryRunner: QueryRunner): Promise<void>
Creates table for storing cache if it does not exist yet.