xior
    Preparing search index...

    Type Alias XiorErrorCacheOptions

    type XiorErrorCacheOptions = {
        cacheItems?: number;
        defaultCache?: ICacheLike<
            { cacheTime?: number; loading?: boolean; res?: XiorResponse },
        >;
        enableCache?: boolean | ((config?: XiorRequestConfig) => boolean);
        onCacheRequest?: (config?: XiorRequestConfig) => void;
        useCacheFirst?: boolean;
    }
    Index

    Properties

    cacheItems?: number

    max cache numbers in LRU, default is 100

    defaultCache?: ICacheLike<
        { cacheTime?: number; loading?: boolean; res?: XiorResponse },
    >
    enableCache?: boolean | ((config?: XiorRequestConfig) => boolean)

    check if we need enable cache, default only GET method orisGet: true enable cache @error-cache-plugin

    onCacheRequest?: (config?: XiorRequestConfig) => void

    for logging purpose @error-cache-plugin

    useCacheFirst?: boolean

    if useCacheFirst: true and have cache, will return the cache response first, then run fetching in the background @error-cache-plugin