title: nginx cache, staticgenerator vs memcached
body: <p>What I'm doing is avoiding having requests hit Django and serving cached data straight from nginx.<br>
  Related question: <a href="https://stackoverflow.com/questions/4988270/django-staticgenerator-vs-cache-backend">Django staticgenerator vs CACHE_BACKEND</a></p>
  
  <p>There seem to be two choices when it comes to this:<br>
  <a href="https://github.com/torchbox/django-nginx-memcache" rel="nofollow noreferrer">https://github.com/torchbox/django-nginx-memcache</a><br>
  <a href="https://github.com/mrj0/staticgenerator" rel="nofollow noreferrer">https://github.com/mrj0/staticgenerator</a> - This one seems easier to use</p>
  
  <p>After trying django-nginx-memcache I found some downsides:</p>
  
  <ul>
  <li>No fallback to serve cached content from django (can be fixed).</li>
  <li>nginx has to be recompiled for md5 sum generation of urls (I don't think this can be fixed).
  
  <ul>
  <li><strong>Edit:</strong> After looking at other solutions (such as: <a href="http://soyrex.com/articles/django-nginx-memcached/" rel="nofollow noreferrer">http://soyrex.com/articles/django-nginx-memcached/</a>) I find that there seems no need to use md5 cache_keys. Maybe this should be an option.</li>
  </ul></li>
  <li>It would be nice to be able to define a list of url patters that should be cached. So far, only decorators are available (can be fixed).</li>
  <li>The code should in my opinion be modelled more after the standard django cache backend with <strong>UpdateCacheMiddleware</strong> and <strong>FetchFromCacheMiddleware</strong>. This would make it easier to implement nginx cache where standard django cache solutions exist. It would also solve problem #1 (can be fixed).</li>
  <li>Strange naming of module. While the project is named <strong>django-nginx-memcache</strong>, the package is named <strong>Django-Memcache-for-Nginx</strong> and the app <strong>nginx_memcache</strong> for inclusion in django installed_apps (can be fixed).</li>
  </ul>
  
  <p>Which is faster?<br>
  Which one would you use and why?<br>
  Should I fix the issues that I have with <strong>django-nginx-memcache</strong> or is <strong>staticgenerator</strong> just better anyway?</p>