Files
fastapi-cache/fastapi_cache
Martijn Pieters 29426de95f Refactor decorator, consolidate miss / hit paths
Use just three code paths: uncacheable, cache miss and cache hit. This
makes it much easier to follow what happens for each case. the only
places where the inner function now exits early are when the call is
uncacheable, or when there is a cache hit and the request included a
matching If-Not-Modified header.

- Use a utility function to capture when a request should not use the
  cache
- Use the starlette.status constant for the 'not modified' status for
  code clarity.
- Use `setattr()` for the inner function signature, avoiding the need
  for a type checker override comment.
2023-05-14 17:03:57 +01:00
..
2023-05-14 17:02:30 +01:00
2023-05-14 17:02:30 +01:00
2023-05-11 12:57:28 +01:00
2022-10-25 08:50:56 +07:00
2023-05-14 17:02:30 +01:00