You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation is sparse and I do not see a way to enable caching for clients generated with openapi-python-client.
Many APIs that leverage OpenAPI will also support content caching and send headers for TTL. When using the same openapi-python-client object to make the same calls, I notice it is making a new request and not serving from a cache. Does this client have support for caching at all? What would be the best way to enable caching with the Cache-Control and Expires headers from the responses?
The text was updated successfully, but these errors were encountered:
There are no caching features in generated clients. I don't believe there are any caching features built into the OpenAPI spec either, so adding them is probably out of scope for this project.
Maybe it could be added as a client middleware once #202 happens. Until then, something would have to be done with custom templates I think.
Thanks for the answers. I am not certain how to use the templates, but since I am using the client in a Flask app I will just cache the objects in a database and use the response headers to define expiration. I do think caching would be a useful feature to have built-in however.
Documentation is sparse and I do not see a way to enable caching for clients generated with openapi-python-client.
Many APIs that leverage OpenAPI will also support content caching and send headers for TTL. When using the same openapi-python-client object to make the same calls, I notice it is making a new request and not serving from a cache. Does this client have support for caching at all? What would be the best way to enable caching with the Cache-Control and Expires headers from the responses?
The text was updated successfully, but these errors were encountered: