mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
Merge remote-tracking branch 'origin/master'
# Conflicts: # fastapi_cache/decorator.py # poetry.lock
This commit is contained in:
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -1,5 +1,5 @@
|
||||
name: ci
|
||||
on: [push, pull_request]
|
||||
on: [ push, pull_request ]
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -8,6 +8,9 @@ jobs:
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- uses: dschep/install-poetry-action@v1.3
|
||||
- name: Install and configure Poetry
|
||||
uses: snok/install-poetry@v1.1.1
|
||||
with:
|
||||
virtualenvs-create: false
|
||||
- name: CI
|
||||
run: make ci
|
||||
|
||||
@@ -26,6 +26,9 @@ def cache(
|
||||
nonlocal coder
|
||||
nonlocal expire
|
||||
nonlocal key_builder
|
||||
request = kwargs.get("request")
|
||||
if request.headers.get("Cache-Control") == "no-store":
|
||||
return await func(*args, **kwargs)
|
||||
|
||||
coder = coder or FastAPICache.get_coder()
|
||||
expire = expire or FastAPICache.get_expire()
|
||||
|
||||
Reference in New Issue
Block a user