Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cache): add environment variable to configure cache options #901

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ environment variables:

## Cache

- `CACHE_BACKEND`: [cache backend](https://docs.djangoproject.com/en/1.11/ref/settings/#backend) to use (default: django.core.cache.backends.locmem.LocMemCache)
- `CACHE_LOCATION`: [location](https://docs.djangoproject.com/en/1.11/ref/settings/#std:setting-CACHES-LOCATION) of cache to use
- `CACHE_BACKEND`: [cache backend](https://docs.djangoproject.com/en/4.2/ref/settings/#backend) to use (default: django.core.cache.backends.locmem.LocMemCache)
- `CACHE_LOCATION`: [location](https://docs.djangoproject.com/en/4.2/ref/settings/#location) of cache to use
- `CACHE_OPTIONS`: [options](https://docs.djangoproject.com/en/4.2/ref/settings/#options) for cache library

## CORS

Expand Down
3 changes: 2 additions & 1 deletion document_merge_service/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ def default(default_dev=env.NOTSET, default_prod=env.NOTSET):
"BACKEND": env.str(
"CACHE_BACKEND", default="django.core.cache.backends.locmem.LocMemCache"
),
"LOCATION": env.str("CACHE_LOCATION", ""),
"LOCATION": env.str("CACHE_LOCATION", default=""),
"OPTIONS": env.dict("CACHE_OPTIONS", default={}),
}
}

Expand Down
Loading