import { Handler } from '../cache-handler.js'; import { C as CreateRedisStringsHandlerOptions } from '../common-types-D3MDcEyB.js'; import '../next-common-DLx9ZJNi.js'; import 'next/dist/server/lib/incremental-cache'; import 'next/dist/server/lib/incremental-cache/file-system-cache'; import 'redis'; /** * Creates a Handler for handling cache operations using Redis strings. * * This function initializes a Handler for managing cache operations using Redis. * It supports Redis Client. The resulting Handler includes * methods to get, set, and manage cache values fot on-demand revalidation. * * @param options - The configuration options for the Redis Handler. See {@link CreateRedisStringsHandlerOptions}. * * @returns An object representing the cache, with methods for cache operations. * * @example * ```js * const client = createClient(clientOptions); * * const redisHandler = await createHandler({ * client, * keyPrefix: 'myApp:', * sharedTagsKey: 'myTags' * }); * ``` * * @remarks * - the `get` method retrieves a value from the cache, automatically converting `Buffer` types when necessary. * - the `set` method allows setting a value in the cache. * - the `revalidateTag` methods are used for handling tag-based cache revalidation. */ declare function createHandler({ client, keyPrefix, sharedTagsKey, timeoutMs, keyExpirationStrategy, revalidateTagQuerySize, }: CreateRedisStringsHandlerOptions): Handler; export { CreateRedisStringsHandlerOptions, createHandler as default };