import { Handler, Context } from 'hono';
import { a as CreateQuery, Q as QueryKey } from '../create-query-B9ILJCq6.js';

type CacheKey = QueryKey | ((ctx: Context) => QueryKey);
type CacheOptions = Omit<CreateQuery, 'queryKey' | 'queryFn' | 'throwOnError' | 'revalidate'> & {
    cacheKey: CacheKey;
    handler: (ctx: Context) => Response | Promise<Response>;
    revalidate?: boolean | ((ctx: Context) => boolean);
};
declare const cache: <E = {}>({ cacheKey, handler, revalidate, ...options }: CacheOptions) => Handler<E>;

export { cache };
