epicweb-dev / cachified

🤑 wrap virtually everything that can store by key to act as cache with ttl/max-age, stale-while-validate, parallel fetch protection and type-safety support
MIT License
916 stars 26 forks source link

Article on simple caching: a review/simplification? #19

Closed crazy4groovy closed 1 year ago

crazy4groovy commented 1 year ago

Hi! I appreciate this lib, I think it has many useful applications!

I wondered about in terms of implementation, how much of it could be simplified? I wrote an article on a similar topic of TTL and LRU; perhaps you could review it and leave some comments? I'd love to hear your thoughts on what could be improved!

https://srjsdev.hashnode.dev/async-promise-cache-invalidation-strategies

Thanks, and Cheers!

Xiphe commented 1 year ago

Thanks for the feedback. I'm currently on vacation but will keep this on my list and have a look at it January 🤙

Xiphe commented 1 year ago

Had a glance on your article and it seems reasonable to me. Not sure what you mean with "how much of it could be simplified" in regards to this library though...

Xiphe commented 1 year ago

Closing since this is more of a discussion. Feel free to continue commenting here though.