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 (37 loc) 1.49 kB
import { CacheProvider } from "alepha/cache"; import * as _alepha_core1 from "alepha"; import * as _alepha_core0 from "alepha"; import { Alepha, Logger, Static } from "alepha"; 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: Logger; protected readonly redisProvider: RedisProvider; protected readonly env: Static<typeof envSchema>; 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_core0.Service<_alepha_core0.Module>; //# sourceMappingURL=index.d.ts.map //#endregion export { AlephaCacheRedis, RedisCacheProvider }; //# sourceMappingURL=index.d.ts.map