UNPKG

bentocache

Version:

Multi-tier cache module for Node.js. Redis, Upstash, CloudfareKV, File, in-memory and others drivers

28 lines (25 loc) 816 B
import { c as DriverCommonOptions } from '../../drivers_options-Dm62iGEe.js'; import 'knex'; import 'kysely'; import '@aws-sdk/client-dynamodb'; import 'ioredis'; import 'orchid-orm'; declare abstract class BaseDriver { #private; protected config: DriverCommonOptions; /** * Current cache prefix */ protected prefix: string; constructor(config: DriverCommonOptions); /** * Creates a namespace prefix by concatenating the cache prefix with the given namespace * If the cache prefix is not defined, the namespace is returned as is */ protected createNamespacePrefix(namespace: string): string; /** * Returns the cache key with the prefix added to it, if a prefix is defined */ protected getItemKey(key: string): string; } export { BaseDriver };