I have Django, PostgreSQL and Redis. I have models that have foreign keys and m2m relationships. Every day I'm caching bunch of objects and dropping their cache at midnight. The problem is when I'm removing object from the database (during the day) - the fields with relationships in cache are also getting changed (id of this objects is removed from foreign keys and m2m). As I read in Redis docs - all objects are stored as Hashes in the server's RAM. I can't understand how database changes could affect to the RAM cache. So why it happens and how can I prevent such behaviour?I have Django, PostgreSQL and Redis. I have mod