pip install django-firebase-cache
# settings.py
CACHES = {
"firebase": {
"BACKEND": "django_firebase_cache.RealtimeDatabaseCache",
"LOCATION": "django", # name of child key in Realtime Database
"OPTIONS": {"databaseURL": "https://project-id.firebaseio.com/"},
},
"firestore": {
"BACKEND": "django_firebase_cache.FirestoreCache",
"LOCATION": "django", # name of collection in Firestore
},
}