title: How can I expire entries to Django database cache?
body: <p>I have a Django application with a registered database cache:</p>
  
  <pre><code>CACHES = {
      'default': {
          'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
          'LOCATION': 'exchange_rate_cache',
      }
  }
  </code></pre>
  
  <p>I want the entries in my cache to expire and be deleted after a week. To delete an entry from the cache all that is needed is the following:</p>
  
  <pre><code>from django.core.cache import cache
  cache.delete(key)
  </code></pre>
  
  <p>However I must only perform this if the entry has been stored in cache for longer than 1 week.</p>
  
  <p>How can this be done? Thank you.</p>