csharp-old icon indicating copy to clipboard operation
csharp-old copied to clipboard

Cache support

Open UmanShahzad opened this issue 4 years ago • 2 comments

There isn't a mention of a cache anywhere here. Is it even supported? If not, we need to add support for that.

Since the codebase seems to basically be completely generated, this might need a significant rework of the entire SDK as it currently stands.

UmanShahzad avatar Dec 23 '20 01:12 UmanShahzad

I can do this, but are you sure this is the responsibility of the SDK?

  1. This is an extra dependency.
  2. Caching can be easily added on top of an existing client using similar libraries - https://github.com/cordialgerm/FluentCache
  3. It is necessary to give the user control over the cache expiration timeout, possibly different for different methods.

HavenDV avatar Dec 23 '20 01:12 HavenDV

All the other SDKs currently work this way, and it is fully overrideable so that a completely separate implementation can be provided, even a no-op one, or a persistence one for disk, etc.

See for example https://github.com/ipinfo/python#caching.

UmanShahzad avatar Dec 23 '20 02:12 UmanShahzad