import { Env } from '../src/config/env.js';
/**
 * Cache Configuration (default override)
 *
 * Keep this file declarative:
 * - Core owns env parsing/default logic.
 * - Projects can override config by editing values below.
 */
export default {
    default: Env.get('CACHE_CONNECTION', Env.get('CACHE_DRIVER', 'memory')).trim().toLowerCase(),
    drivers: {
        memory: {
            driver: 'memory',
            ttl: Env.getInt('CACHE_MEMORY_TTL', 3600),
        },
        redis: {
            driver: 'redis',
            host: Env.get('REDIS_HOST', 'localhost'),
            port: Env.getInt('REDIS_PORT', 6379),
            ttl: Env.getInt('CACHE_REDIS_TTL', 3600),
        },
        mongodb: {
            driver: 'mongodb',
            uri: Env.get('MONGO_URI', ''),
            db: Env.get('MONGO_DB', 'zintrust_cache'),
            ttl: Env.getInt('CACHE_MONGO_TTL', 3600),
        },
        kv: {
            driver: 'kv',
            ttl: Env.getInt('CACHE_KV_TTL', 3600),
        },
        'kv-remote': {
            driver: 'kv-remote',
            ttl: Env.getInt('CACHE_KV_TTL', 3600),
        },
    },
    keyPrefix: Env.get('CACHE_KEY_PREFIX', 'zintrust:'),
    ttl: Env.getInt('CACHE_TTL', 3600),
};
