UNPKG

lakutata

Version:

An IoC-based universal application framework.

95 lines (86 loc) 2.12 kB
import { DTO } from './TypeDef.internal.96.js'; declare class FileCacheOptions extends DTO { type: 'file'; /** * the file path to store the data */ filename: string; /** * ms, check and remove expired data in each ms */ expiredCheckDelay?: number; /** * ms, batch write to disk in a specific duration, enhance write performance. */ writeDelay?: number; /** * namespace */ namespace?: string; } declare class RedisCacheOptions extends DTO { type: 'redis'; host: string; port?: number; database?: number; tls?: boolean; keepAlive?: number; username?: string; password?: string; reconnect?: boolean; namespace?: string; keyPrefixSeparator?: string; clearBatchSize?: number; useUnlink?: boolean; noNamespaceAffectsAll?: boolean; connectTimeout?: number; throwOnConnectError?: boolean; } declare class SqliteCacheOptions extends DTO { type: 'sqlite'; database: string; table: string; busyTimeout?: number; namespace?: string; } declare class PostgresCacheOptions extends DTO { type: 'postgres'; host: string; database: string; table: string; port?: number; schema?: string; username: string; password: string; maxPoolSize?: number; namespace?: string; } declare class MysqlCacheOptions extends DTO { type: 'mysql'; host: string; database: string; table: string; port?: number; username: string; password: string; namespace?: string; } declare class MongoCacheOptions extends DTO { type: 'mongo'; host: string; database: string; collection: string; port?: number; username: string; password: string; namespace?: string; } declare class MemcacheCacheOptions extends DTO { type: 'memcache'; host: string; port?: number; username?: string; password?: string; namespace?: string; } export { FileCacheOptions, MemcacheCacheOptions, MongoCacheOptions, MysqlCacheOptions, PostgresCacheOptions, RedisCacheOptions, SqliteCacheOptions };