UNPKG

alepha

Version:

Alepha is a convention-driven TypeScript framework for building robust, end-to-end type-safe applications, from serverless APIs to full-stack React apps.

39 lines (38 loc) 1.5 kB
import { CacheProvider } from "alepha/cache"; import * as _alepha_core1 from "alepha"; import { Alepha, Static } from "alepha"; import * as _alepha_logger0 from "alepha/logger"; import { RedisProvider } from "alepha/redis"; //#region src/providers/RedisCacheProvider.d.ts declare const envSchema: _alepha_core1.TObject<{ REDIS_CACHE_PREFIX: _alepha_core1.TOptional<_alepha_core1.TString>; }>; declare module "alepha" { interface Env extends Partial<Static<typeof envSchema>> {} } declare class RedisCacheProvider implements CacheProvider { protected readonly log: _alepha_logger0.Logger; protected readonly redisProvider: RedisProvider; protected readonly env: { REDIS_CACHE_PREFIX?: string | undefined; }; protected readonly alepha: Alepha; get(name: string, key: string): Promise<Uint8Array | undefined>; set(name: string, key: string, value: Uint8Array | string, ttl?: number): Promise<Uint8Array>; del(name: string, ...keys: string[]): Promise<void>; has(name: string, key: string): Promise<boolean>; keys(name: string, filter?: string): Promise<string[]>; protected prefix(...path: string[]): string; } //#endregion //#region src/index.d.ts /** * Plugin for Alepha Cache that provides Redis caching capabilities. * * @see {@link RedisCacheProvider} * @module alepha.cache.redis */ declare const AlephaCacheRedis: _alepha_core1.Service<_alepha_core1.Module>; //#endregion export { AlephaCacheRedis, RedisCacheProvider }; //# sourceMappingURL=index.d.ts.map