long2ice/fastapi-cache

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

willatlawford opened this issue · 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.
** #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

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?

* #145