import type { InspectorManager } from './inspector_manager.js'; import type { HttpContext } from '@adonisjs/core/http'; /** * Access policy for cache operations, resolved by the controller from * `advanced.cacheKeyPrefix` (or the SERVER_STATS_CACHE_KEY_PREFIX env var). * * The prefix restricts which Redis keys the dashboard may list, read, or * delete so a dashboard viewer can't target arbitrary keys (sessions, * rate-limit counters). Empty/unset stays unrestricted in dev for * back-compat, but fails closed in production: single-key reads and deletes * on a shared production Redis need a deliberate scope, not a default. */ export interface CacheAccessPolicy { prefix: string; inProduction: boolean; } /** * Handle GET /cache-stats — list cache keys and overall stats. */ export declare function handleCacheStats(inspectors: InspectorManager, { request, response }: HttpContext, policy: CacheAccessPolicy): Promise; /** * Handle GET /cache-stats/:key — get a single cache key's value and metadata. */ export declare function handleCacheKey(inspectors: InspectorManager, { params, response }: HttpContext, policy: CacheAccessPolicy): Promise; /** * Handle DELETE /cache-stats/:key — delete a single cache key. */ export declare function handleCacheKeyDelete(inspectors: InspectorManager, { params, response }: HttpContext, policy: CacheAccessPolicy): Promise;