@karmaniverous/cached-axios
    Preparing search index...

    Interface CacheRequestConfig<R, D>

    Options that can be overridden per request

    interface CacheRequestConfig<R = any, D = any> {
        adapter?: AxiosAdapterConfig | AxiosAdapterConfig[];
        allowAbsoluteUrls?: boolean;
        auth?: AxiosBasicCredentials;
        baseURL?: string;
        beforeRedirect?: (
            options: Record<string, any>,
            responseDetails: {
                headers: Record<string, string>;
                statusCode: HttpStatusCode;
            },
        ) => void;
        cache?: false
        | Partial<CacheProperties<R, D>>;
        cancelToken?: CancelToken;
        data?: D;
        decompress?: boolean;
        env?: { FormData?: new (...args: any[]) => object };
        family?: AddressFamily;
        fetchOptions?:
            | Record<string, any>
            | Omit<RequestInit, "body" | "headers" | "method" | "signal">;
        formSerializer?: FormSerializerOptions;
        headers?:
            | AxiosHeaders
            | Partial<
                RawAxiosHeaders & {
                    Accept: AxiosHeaderValue;
                    Authorization: AxiosHeaderValue;
                    "Content-Encoding": AxiosHeaderValue;
                    "Content-Length": AxiosHeaderValue;
                    "User-Agent": AxiosHeaderValue;
                } & { "Content-Type": ContentType },
            > & Partial<
                {
                    delete: AxiosHeaders;
                    get: AxiosHeaders;
                    head: AxiosHeaders;
                    link: AxiosHeaders;
                    options: AxiosHeaders;
                    patch: AxiosHeaders;
                    post: AxiosHeaders;
                    purge: AxiosHeaders;
                    put: AxiosHeaders;
                    unlink: AxiosHeaders;
                } & { common: AxiosHeaders },
            >;
        httpAgent?: any;
        httpsAgent?: any;
        id?: string;
        insecureHTTPParser?: boolean;
        lookup?:
            | (
                (
                    hostname: string,
                    options: object,
                    cb: (
                        err: null | Error,
                        address: LookupAddress | LookupAddress[],
                        family?: AddressFamily,
                    ) => void,
                ) => void
            )
            | (
                (
                    hostname: string,
                    options: object,
                ) => Promise<
                    | LookupAddress
                    | [
                        address: LookupAddressEntry
                        | LookupAddressEntry[],
                        family?: AddressFamily,
                    ],
                >
            );
        maxBodyLength?: number;
        maxContentLength?: number;
        maxRate?: number | [number, number];
        maxRedirects?: number;
        method?: string;
        onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void;
        onUploadProgress?: (progressEvent: AxiosProgressEvent) => void;
        params?: any;
        paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer;
        proxy?: false | AxiosProxyConfig;
        responseEncoding?: string;
        responseType?: ResponseType;
        signal?: GenericAbortSignal;
        socketPath?: null | string;
        timeout?: number;
        timeoutErrorMessage?: string;
        transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
        transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
        transitional?: TransitionalOptions;
        transport?: any;
        url?: string;
        validateStatus?: null | ((status: number) => boolean);
        withCredentials?: boolean;
        withXSRFToken?:
            | boolean
            | ((config: InternalAxiosRequestConfig) => undefined | boolean);
        xsrfCookieName?: string;
        xsrfHeaderName?: string;
    }

    Type Parameters

    • R = any

      The type returned by this response

    • D = any

      The type for the request body

    Hierarchy (View Summary)

    Index

    Properties

    adapter?: AxiosAdapterConfig | AxiosAdapterConfig[]
    allowAbsoluteUrls?: boolean
    auth?: AxiosBasicCredentials
    baseURL?: string
    beforeRedirect?: (
        options: Record<string, any>,
        responseDetails: {
            headers: Record<string, string>;
            statusCode: HttpStatusCode;
        },
    ) => void
    cache?: false | Partial<CacheProperties<R, D>>

    The cache option available through the request config is where all the cache customization happens.

    Setting the cache property to false will disable the cache for this request.

    This does not mean that the current cache will be excluded from the storage.

    'inherits from global configuration'
    
    cancelToken?: CancelToken
    data?: D
    decompress?: boolean
    env?: { FormData?: new (...args: any[]) => object }
    family?: AddressFamily
    fetchOptions?:
        | Record<string, any>
        | Omit<RequestInit, "body" | "headers" | "method" | "signal">
    formSerializer?: FormSerializerOptions
    headers?:
        | AxiosHeaders
        | Partial<
            RawAxiosHeaders & {
                Accept: AxiosHeaderValue;
                Authorization: AxiosHeaderValue;
                "Content-Encoding": AxiosHeaderValue;
                "Content-Length": AxiosHeaderValue;
                "User-Agent": AxiosHeaderValue;
            } & { "Content-Type": ContentType },
        > & Partial<
            {
                delete: AxiosHeaders;
                get: AxiosHeaders;
                head: AxiosHeaders;
                link: AxiosHeaders;
                options: AxiosHeaders;
                patch: AxiosHeaders;
                post: AxiosHeaders;
                purge: AxiosHeaders;
                put: AxiosHeaders;
                unlink: AxiosHeaders;
            } & { common: AxiosHeaders },
        >
    httpAgent?: any
    httpsAgent?: any
    id?: string

    The Request ID used in this request.

    It may have been generated by the Key Generator or a custom one provided by config.id

    'auto generated by the current key generator'
    
    insecureHTTPParser?: boolean
    lookup?:
        | (
            (
                hostname: string,
                options: object,
                cb: (
                    err: null | Error,
                    address: LookupAddress | LookupAddress[],
                    family?: AddressFamily,
                ) => void,
            ) => void
        )
        | (
            (
                hostname: string,
                options: object,
            ) => Promise<
                | LookupAddress
                | [
                    address: LookupAddressEntry
                    | LookupAddressEntry[],
                    family?: AddressFamily,
                ],
            >
        )
    maxBodyLength?: number
    maxContentLength?: number
    maxRate?: number | [number, number]
    maxRedirects?: number
    method?: string
    onDownloadProgress?: (progressEvent: AxiosProgressEvent) => void
    onUploadProgress?: (progressEvent: AxiosProgressEvent) => void
    params?: any
    paramsSerializer?: ParamsSerializerOptions | CustomParamsSerializer
    proxy?: false | AxiosProxyConfig
    responseEncoding?: string
    responseType?: ResponseType
    signal?: GenericAbortSignal
    socketPath?: null | string
    timeout?: number
    timeoutErrorMessage?: string
    transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[]
    transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[]
    transitional?: TransitionalOptions
    transport?: any
    url?: string
    validateStatus?: null | ((status: number) => boolean)
    withCredentials?: boolean
    withXSRFToken?:
        | boolean
        | ((config: InternalAxiosRequestConfig) => undefined | boolean)
    xsrfCookieName?: string
    xsrfHeaderName?: string