How can I load resources from mysql database when Django starts up and put it in memory (Redis) to use by all the applications.
I have seen this [https://docs.djangoproject.com/en/dev/ref/applications/#django.apps.AppConfig.ready]
class MyAppConfig(AppConfig):
def ready(self):
But they mention not use db connections inside ready function. How can do it when my Website starts.?
And Can I also set cache value inside ready ?
from django.core.cache import cache
cache.set()