Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Custom Invalidate Function - Type Error on removeItem, uuid #271

Open
KumarSumitD opened this issue Aug 17, 2022 · 1 comment
Open

Custom Invalidate Function - Type Error on removeItem, uuid #271

KumarSumitD opened this issue Aug 17, 2022 · 1 comment

Comments

@KumarSumitD
Copy link

Hi,
As per the Readme https://github.com/RasCarlito/axios-cache-adapter/blob/master/README.md?plain=1#L366.
Custom invalidate function can be defined and the cache can be busted by -
await config.store.removeItem(config.uuid)

There are two types issue -

  • Property 'removeItem' does not exist on type 'object'.
  • Property 'uuid' does not exist on type 'IAxiosCacheAdapterOptions'.

We can try making as unknow as any and as any, but this will error prone. So if we correct types for both.

@arthurfiorette
Copy link

Hey, axios-cache-adapter unmaintained, axios-cache-interceptors offers this same feature for less problems :)

I'm the maintainer of https://axios-cache-interceptor.js.org, you should check it out...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants