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

chore: modification de la stratégie de mise en cache #853

Merged
merged 3 commits 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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
pip install -r requirements/dev.txt
- name: ✨ Black, ruff & djlint
run: make quality
- name: 🚧 create cache table
run: python manage.py createcachetable
- name: 🚧 collect static for testing purposes
run: |
python manage.py collectstatic
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $ docker-compose --profile django up
## Préparer l'environnement de données

```bash
$ python manage.py createcachetable
$ python manage.py migrate
$ python manage.py populate
$ python manage.py configure_bucket
Expand Down
1 change: 1 addition & 0 deletions clevercloud/python.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"module": "config.wsgi:application",
"managetasks": [
"migrate --no-input",
"createcachetable",
"collectstatic --no-input",
"compilemessages",
"compress"
Expand Down
3 changes: 2 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@
# https://docs.djangoproject.com/en/4.1/topics/cache/
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
"BACKEND": "django.core.cache.backends.db.DatabaseCache",
"LOCATION": "cache_table",
},
"machina_attachments": {
"BACKEND": "django.core.cache.backends.filebased.FileBasedCache",
Expand Down
Loading