-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Not caching requests except for GET #75
Comments
Legitimate use case for caching POST would be ML model prediction. I think the reason it is only caching GETs is to limit surface area for testing. @long2ice any thoughts? |
Thanks for the reply @jameswinegar, that is exactly why I was wondering, because I use the package to cache ML predictions. |
In my case for a normal CRUD like web api for a website I wouldn't want to cache POSTs, I guess the reasoning in the lib is similar. You can make a modified decorator at least, that's what I'm doing for other reasons (made it work with SQLModel, and cache final JSONs, not py objects), but ofc caching POST might be nice and would be simple as an option in the lib too. |
Has this been examined more? We really need to cache post requests. How have people been working around it? @long2ice |
A need to cache POST has been mentioned many times. Should I submit a PR to add it?
|
OK, just do it |
If #139 is accepted, the code base is going to be easier to update here. Just update the new Given that you can decorate an endpoint with |
#186 PR that implements. |
Any update ? It's still not available |
Hello!
I do not completely understand why caching is disabled for methods except for GET, and if so, why is request passed as the first parameter to the function?
In my case, which is something in the lines of:
this leads to an error, because parameter request is passed twice (once as request, and another in args/kwargs)
Thanks!
The text was updated successfully, but these errors were encountered: