-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from InTaVia/ms/196-filter-for-`entityType-==…
…-group`-results-in-internal-server-error Ms/196 filter for `entity type == group` results in internal server error
- Loading branch information
Showing
4 changed files
with
21 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"""Wrapper around the FastApiCache-2 library""" | ||
import os | ||
from fastapi_cache.decorator import cache | ||
|
||
|
||
def nocache(*args, **kwargs): | ||
def decorator(func): | ||
return func | ||
return decorator | ||
|
||
# I have an .env file, and my get_settings() reads the .env file | ||
if os.environ.get("APIS_REDIS_CACHING", "True") == "True": | ||
cache = cache | ||
else: | ||
cache = nocache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters