fastapi-cache icon indicating copy to clipboard operation
fastapi-cache copied to clipboard

Can we have a v0.2.2 release including the new `_uncacheable` function - so we can monkey patch for non-GET caching?

Open willatlawford opened this issue 2 years ago • 4 comments

Good library, thank you - I have built some of this functionality by hand before but it's nice to see a good library instead. Unfortunately, I can't make use of this library yet - as per several comments, I need to cache POST requests.*

As far as I can see from issues, allowing non-GET caching is planned**. It does at least look like the code has been refactored to allow monkey patching now*** but:

  • there isn't a versioned release containing this refactor yet - so I would have to install the dev branch from github directly to use it - which I don't love for my dependencies.
  • it would be even nicer if I could allow post caching directly by configuration.

Is there a plan to create a release soon? Is there a plan to allow non-GET via configuration?

Many thanks, Will

* I have a machine learning use case where it is necessary to POST data, but the response for a given payload does not change. ** https://github.com/long2ice/fastapi-cache/issues/75 : long2ice on Jan 21: "OK, just do it". *** https://github.com/long2ice/fastapi-cache/blob/main/fastapi_cache/decorator.py#L82 Looks like you can override fastapi_cache.decorator._uncacheable

willatlawford avatar Jun 23 '23 09:06 willatlawford

Just came across the v1.0.0 plan* which includes non-GET as configuration. Perhaps we can have another sub v1 release prior to that so I can at least monkey patch _uncacheable?

* https://github.com/long2ice/fastapi-cache/issues/145

willatlawford avatar Jun 23 '23 10:06 willatlawford

I'd appreciate seeing https://github.com/long2ice/fastapi-cache/issues/273 in a sub 1.0.0 release too.

aausch avatar Aug 15 '23 22:08 aausch

Also https://github.com/long2ice/fastapi-cache/issues/281

aausch avatar Aug 24 '23 13:08 aausch

+1, it would be really nice to have a minor release to have at least the _unreachable function.

mgguo avatar May 22 '24 13:05 mgguo