UNPKG

@paulwer/prisma-extension-cache-manager

Version:

A caching extension for [Prisma](https://www.prisma.io/), fully compatible with [cache-manager](https://www.npmjs.com/package/cache-manager), predefined uncaching strategies and custom handlers for key generation and uncaching.

13 lines (12 loc) 697 B
import { Prisma } from "@prisma/client"; import { PrismaExtensionCacheConfig } from "./types"; export declare function generateComposedKey(options: { model: string; operation: string; namespace?: string; queryArgs: any; }): string; export declare function createKey(key?: string, namespace?: string): string; export declare function serializeData(data: any, prefixes?: PrismaExtensionCacheConfig["typePrefixes"]): string | undefined; export declare function deserializeData(serializedData: any, prefixes?: PrismaExtensionCacheConfig["typePrefixes"]): any; export declare function getInvolvedModels(prisma: typeof Prisma, modelName: string, operation: string, args: any): string[];