title: How can I schedule the invalidation of a redis cache?
body: <p>I am using django as a framework to build a content management system for a site with a blog.</p>
  
  <p>Each blog post will have a route that contains a unique identifier for the blog post. These blog posts can be scheduled and have an expiry date. This means that the routes have to be dynamic.</p>
  
  <p>The entire site needs to be cached and we have redis set up as a back end cache. We currently cache rendered pages against out static routes, but need to find a way of caching pages against the dynamic routes (and invalidating them when the blog posts expire.) </p>
  
  <p>I could use a cron job but it isn't appropriate because...
      a) New blog posts go live rarely and not periodically
      b) Users can schedule posts to the minute. This means that a cron job would have to run every minute which seems like overkill!</p>
  
  <p>I've just found the <a href="https://www.djangopackages.com/packages/p/cacheops/" rel="nofollow">django-cacheops</a> library, which seems to do exactly what I need (schedule the invalidation of our cache and invalidate them via signals). Is this compatible with our existing setup and how easy is the setup?</p>
  
  <p>I assume this is a pretty common problem - does anyone have any better ideas than the above? </p>