title: django-redis persisting json data
body: <p>I have a small django site which controls an anstronomy dome and house automation.  On start up the project loads 3 json files: relays, conditions and homeautomation.  To avoid constant reading and writing to the Pi4's ssd I load the json files into REDIS (on start up in apps, see below).  I already have REDIS running in a docker as the project uses celery.</p>
  <p>My problem is that within a few minutes of loading the json into REDIS it clears the data out of cache.</p>
  <p>I load the json file in the form of a dictionary (dict) in apps</p>
  <pre><code>cache.set(&quot;REDIS_ashtreeautomation_dict&quot;, dict, timeout=None)
  </code></pre>
  <p>and set</p>
  <pre><code>CACHES = {
  &quot;default&quot;: {
      &quot;BACKEND&quot;: &quot;django_redis.cache.RedisCache&quot;,
      &quot;LOCATION&quot;: &quot;redis://redis:6379&quot;,
      &quot;OPTIONS&quot;: {
          &quot;CLIENT_CLASS&quot;: &quot;django_redis.client.DefaultClient&quot;,
          &quot;SERIALIZER&quot;: &quot;django_redis.serializers.json.JSONSerializer&quot;,
          &quot;TIMEOUT&quot;: None
      }
  }
  </code></pre>
  <p>}</p>
  <p>I don't need the data to persist if the dockers go down and I don't need db functions.  Caching these files is ideal but I need them to 'stay alive' for the lifetime of the server.</p>
  <p>Thank you.</p>