import { DbQueryResultCache } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/cache/DbQueryResultCache.ts";
Caches query result into current database, into separate table called "query-result-cache".
Methods
protected
getQueryRunner(queryRunner: QueryRunner | undefined): QueryRunnerGets a query runner to work with.
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 with given cache provider.
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 | undefined,
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.