Files
backend/core/config/cache.py
A'zamov Samandar 0229a0595c
Some checks failed
Deploy Django Application to Server / deploy (push) Failing after 19s
Telegram Notifications / Telegram Gate (push) Failing after 5s
gealogiuya
2026-02-27 14:56:23 +05:00

18 lines
514 B
Python

import os
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": os.getenv("REDIS_CACHE_URL"),
"OPTIONS": {"CLIENT_CLASS": "django_redis.client.DefaultClient"},
"KEY_PREFIX": "core",
}
}
CACHE_MIDDLEWARE_SECONDS = os.getenv("CACHE_TIMEOUT")
# In your Django settings.py or a dedicated Celery configuration module
CELERY_BROKER_URL = os.getenv("CELERY_BROKER", "redis://redis:6379/0")
CELERY_RESULT_BACKEND = os.getenv("RABBITMQ_RESULT_BACKEND")