import { I as ICacheLike } from '../utils-_ORP98vM.mjs'; import { b as XiorRequestConfig, a as XiorResponse, e as XiorPlugin } from '../types-BvXZzfqR.mjs'; type XiorPromise = Promise; type XiorCacheOptions = { /** * check if we need enable cache, default only `GET` method or`isGet: true` enable cache */ enableCache?: boolean | ((config?: XiorRequestConfig) => boolean); defaultCache?: ICacheLike; /** max cache number in LRU, default is 100 */ cacheItems?: number; /** cache time in ms, default is 5 minutes */ cacheTime?: number; /** Process the config before generating the key based on data/params. The config is a new object, not a request reference. */ normalizeParams?: (config: XiorRequestConfig) => XiorRequestConfig; }; /** @ts-ignore */ declare module 'xior' { interface XiorRequestConfig extends Omit { /** forceUpdate, default: false */ forceUpdate?: boolean; } interface XiorResponse { fromCache?: boolean; cacheTime?: number; cacheKey?: string; } interface XiorInterceptorResponseConfig { fromCache?: boolean; cacheTime?: number; cacheKey?: string; } } declare function xiorCachePlugin(options?: XiorCacheOptions): XiorPlugin; export { type XiorCacheOptions, xiorCachePlugin as default };