incepter / react-promise-cache

promises cache for react
MIT License
7 stars 1 forks source link

useEvict() #9

Open incepter opened 1 year ago

incepter commented 1 year ago

Add a hook called useEvict that works like this

let evict = useEvict();

// later,
evict(functionReference, ...args)

This would allow to remove any entry from the current cache by its reference

A global similar API should exist, too.