Files
klz-cables.com/.pnpm-store/v10/files/ac/75aab995d1777cf670b65b37772300bb7eb0fc3c135e1baf0c481aec230e2cfb3d51aed03f9ce9174016668949e654550142941b99573c9fed135f37a5126f
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

37 lines
1.4 KiB
Plaintext

import { entityKind } from "../../entity.js";
import type { Table } from "../../index.js";
import type { CacheConfig } from "./types.js";
export declare abstract class Cache {
static readonly [entityKind]: string;
abstract strategy(): 'explicit' | 'all';
/**
* Invoked if we should check cache for cached response
* @param sql
* @param tables
*/
abstract get(key: string, tables: string[], isTag: boolean, isAutoInvalidate?: boolean): Promise<any[] | undefined>;
/**
* Invoked if new query should be inserted to cache
* @param sql
* @param tables
*/
abstract put(hashedQuery: string, response: any, tables: string[], isTag: boolean, config?: CacheConfig): Promise<void>;
/**
* Invoked if insert, update, delete was invoked
* @param tables
*/
abstract onMutate(params: MutationOption): Promise<void>;
}
export declare class NoopCache extends Cache {
strategy(): "all";
static readonly [entityKind]: string;
get(_key: string): Promise<any[] | undefined>;
put(_hashedQuery: string, _response: any, _tables: string[], _config?: any): Promise<void>;
onMutate(_params: MutationOption): Promise<void>;
}
export type MutationOption = {
tags?: string | string[];
tables?: Table<any> | Table<any>[] | string | string[];
};
export declare function hashQuery(sql: string, params?: any[]): Promise<string>;