Files
UHD_Media_Tool/packages/db/src/index.ts
T
rootandClaude Opus 5.5 946fca5e55 feat(cache): PG kv_cache ported from MP TTLCache, TMDB request and recognize caches
Migration 0042_cache adds UNLOGGED kv_cache. PgCache mirrors MP
runtime/cache.py (region, per-key TTL, TLRU maxsize eviction, @cached as
cachedCall); only the storage moves from memory to PG. TMDB request
responses (MP TMDb.request @cached) and recognize results (MP TmdbCache:
same key, {id:0} negative cache with EMPTY_RESULT_CACHE_TTL, type-conflict
checks, backfill after manual assignment) live in kv_cache, shared by all
processes. Settings cache.tmdbTtlHours / tmdbMaxSize / emptyResultTtlSec
map to META_CACHE_EXPIRE / CONF.tmdb / EMPTY_RESULT_CACHE_TTL. TMDB
details now also store posterPath / backdropPath.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-28 22:26:29 +08:00

22 lines
649 B
TypeScript

// 统一从本包取 Kysely 与 sql,避免各包各装一份 kysely
export { type Kysely, sql, type Transaction } from "kysely";
export {
type CachedOptions,
cachedCall,
DEFAULT_CACHE_SIZE,
DEFAULT_CACHE_TTL,
PgCache,
pgCacheFor,
type SetOptions as CacheSetOptions,
} from "./cache.ts";
export { type CreateDbOptions, createDb } from "./client.ts";
export { createMigrator, MIGRATIONS_DIR, type MigratorOptions, migrateToLatest, resetSchema } from "./migrator.ts";
export {
type AcquireOptions,
type AcquireResult,
type BucketSpec,
PgTokenBucket,
pgTokenBucketFor,
} from "./rate-limit.ts";
export type * from "./types.ts";