bentocache
Version:
Multi-tier cache module for Node.js. Redis, Upstash, CloudfareKV, File, in-memory and others drivers
31 lines (28 loc) • 890 B
TypeScript
import { DriverCommonOptions } from '../types/main.js';
import '@poppinss/exception';
import '@boringnode/bus/types/main';
import '@julr/utils/logger';
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 };