cockatiel icon indicating copy to clipboard operation
cockatiel copied to clipboard

Any plans to add Caching policy like in Polly?

Open johnib opened this issue 2 years ago • 2 comments

Hi,

Would be happy to get to a feature parity with .NET's Polly library. So far I'm using this library extensively.. and Caching policy is one part that is missing.

Thank you!

johnib avatar Jun 27 '22 08:06 johnib

Perhaps the policy could be built on top of (or align to) keyv. Could help get it working "out of the box" with other tools. By default, it would cache in memory, but there are adaptors for things like Redis available.

moberegger avatar Jul 08 '22 20:07 moberegger

Yea, I think this is probably out of scope at first glance, but would need to look into Polly more. Notably .NET has an official IDistributedCache interface so that any cache that implements it can work automatically with Polly. JavaScript does not have an equivalent.

It'd be easy for a caching library to consume Cockatiel by taking policies in its operations, or wrap a caching library to that effect.

connor4312 avatar Jul 08 '22 20:07 connor4312

I don't have any plans here.

connor4312 avatar Aug 13 '22 19:08 connor4312