Skip to main content
Module

x/typeorm/src/cache/QueryResultCache.ts>QueryResultCache

Forked from https://github.com/typeorm/typeorm
Latest
interface QueryResultCache
import { type QueryResultCache } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/cache/QueryResultCache.ts";

Implementations of this interface provide different strategies to cache query builder results.

Methods

connect(): Promise<void>

Creates a connection with given cache provider.

disconnect(): Promise<void>

Closes a connection with given cache provider.

synchronize(queryRunner?: QueryRunner): Promise<void>

Performs operations needs to be created during schema synchronization.

getFromCache(options: QueryResultCacheOptions, queryRunner?: QueryRunner): Promise<QueryResultCacheOptions | undefined>

Caches given query result.

storeInCache(
options: QueryResultCacheOptions,
savedCache: QueryResultCacheOptions | undefined,
queryRunner?: QueryRunner,
): Promise<void>

Stores given query result in the cache.

isExpired(savedCache: QueryResultCacheOptions): boolean

Checks if cache is expired or not.

clear(queryRunner?: QueryRunner): Promise<void>

Clears everything stored in the cache.

remove(identifiers: string[], queryRunner?: QueryRunner): Promise<void>

Removes all cached results by given identifiers from cache.