Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Cache with maxAgeSeconds option not expiring for cacheFirst strategy #279

Open
@nnagakarthikeyan

Description

@nnagakarthikeyan

In my localhost for a cacheFirst strategy if "maxAgeSeconds" option is set for the custom cache , it is never getting expired after the defined interval and always getting the old cached response.

Also made sure in my cached response the date header is present

Also the indexedDB contains the exact timestamp of the requested url.

Below is the sw-toolbox version detail

"sw-toolbox" : "^3.6.1"

Below is the sample code were the caching strategy is applied.

toolbox.router.get(/sam/v1/productDetails/k-21225F91386049$/, toolbox.cacheFirst,{
cache: {
name: 'product details cache',
maxAgeSeconds: 5
}
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions