import type { RequestHandler } from 'express'; import type { Memorize } from '../domain/Memorize'; import type { MemorizeCallOptions } from '../domain/MemorizeCallOptions'; import type { MemorizeStoreLike } from '../MemorizeStoreLike'; /** * Creates an Express `RequestHandler` that caches `GET` responses using the * provided {@link Memorize} instance. * * Import from `express-memorize/express` when you need the adapter directly, * without going through the `memorize()` factory. * * @example * ```ts * import { memorize } from 'express-memorize'; * import { createExpressAdapter } from 'express-memorize/express'; * * const cache = memorize({ ttl: 30_000 }); * app.get('/users', createExpressAdapter(cache), handler); * app.get('/products', createExpressAdapter(cache, { ttl: 5_000 }), handler); * ``` */ export declare function createExpressAdapter(cache: Memorize, options?: MemorizeCallOptions): RequestHandler; /** @internal Used by the memorize() factory. */ export declare function createExpressMiddleware(store: MemorizeStoreLike, globalTtl?: number): (callOptions?: MemorizeCallOptions) => RequestHandler; //# sourceMappingURL=express.d.ts.map