Comunica
    Preparing search index...

    Interface IRevalidationPolicy<I>

    interface IRevalidationPolicy<I> {
        matches: boolean;
        modified: boolean;
        policy: ICachePolicy<I>;
    }

    Type Parameters

    • I
    Index

    Properties

    matches: boolean
    modified: boolean

    Boolean indicating whether the response body has changed.

    • If false, then a valid 304 Not Modified response has been received, and you can reuse the old cached response body.
    • If true, you should use new response's body (if present), or make another request to the origin server without any conditional headers (i.e. don't use revalidationHeaders() this time) to get the new resource.
    policy: ICachePolicy<I>

    A new ICachePolicy with HTTP headers updated from revalidationResponse. You can always replace the old cached ICachePolicy with the new one.