import { Handler } from '../cache-handler.js'; import '../next-common-DLx9ZJNi.js'; import 'next/dist/server/lib/incremental-cache'; import 'next/dist/server/lib/incremental-cache/file-system-cache'; type ServerCacheHandlerOptions = { /** * The base URL of the cache store server. * * @since 1.0.0 */ baseUrl: URL | string; /** * Timeout in milliseconds for remote cache store operations. * * @since 1.0.0 */ timeoutMs?: number; }; /** * Creates a server-based Handler to use with the `@neshca/server` package. * * This function initializes a Handler for managing cache operations via a server. * It includes methods to get, set, and manage cache values and revalidated tags, * leveraging server-side storage. * * @deprecated This Handler is deprecated since @neshca/cache-handler version 1.7.0 and will be removed in the next major release. * * @param options - The configuration options for the server Handler. See {@link ServerCacheHandlerOptions}. * * @returns An object representing the cache, with methods for cache operations. * * @example * ```js * const serverHandler = createHandler({ * baseUrl: 'http://localhost:8080/', * }); * ``` * * @remarks * - the `get` method retrieves a value from the server cache. If the server response has status 404, it returns `null`. * - the `set` method allows setting a value in the server cache. * - the `revalidateTag` methods are used for handling tag-based cache revalidation. */ declare function createHandler({ baseUrl, timeoutMs }: ServerCacheHandlerOptions): Handler; export { type ServerCacheHandlerOptions, createHandler as default };