title: Django-compressor / django-storages links being wrongly cached; expiring
body: <p>I have a Heroku setup with <a href="http://django_compressor.readthedocs.org/en/latest/index.html" rel="noreferrer">django-compressor</a> compressing my CSS and JS files. My default cache backend is set up with memcached (actually Memcachier when on Heroku). My static files are being served on an Amazon S3 instance (handled by <a href="http://django-storages.readthedocs.org/en/latest/index.html" rel="noreferrer">django-storages</a> and boto). Generally my setup is in line with <a href="http://django_compressor.readthedocs.org/en/latest/remote-storages/" rel="noreferrer">this one from the django-compressor docs</a>.</p>
  
  <p>In my pages, the links to my compressed files have an "expires" query that seems to be an hour from when the link is generated. I don't want to set there to be no expiration for all CSS or JS requests because I have some CSS and JS that I don't compress (it gives me errors when I try... probably a different question).</p>
  
  <p>However, once an hour the links break and the site has no more styles or JS. It looks like the link, or at least the expires header, is being cached and not regenerated, so after the time in the expires argument passes, Amazon no longer returns the file. If I flush the memcache, it changes the expires header in the link to an hour from then, which fixes the problem for an hour, until it expires again.</p>
  
  <p>Here is an example of a link that was generated around 1:39 PM EST today, Tuesday, September 18: <a href="https://zen180-static.s3.amazonaws.com/CACHE/css/68d31794a646.css?Signature=u/TxeF7LBBZTDV79YovOjoK2tcw=&amp;Expires=1347993542&amp;AWSAccessKeyId=AKIAIJ7VKLEX7HIMJZCA" rel="noreferrer">https://zen180-static.s3.amazonaws.com/CACHE/css/68d31794a646.css?Signature=u%2FTxeF7LBBZTDV79YovOjoK2tcw%3D&amp;Expires=1347993542&amp;AWSAccessKeyId=AKIAIJ7VKLEX7HIMJZCA</a>. After it is first generated, the page continues to serve that link without alteration. Around 2:39 EST (i.e. the Unix time 1347993542, from the expires argument in the URL), that link stopped working and sent back an "Expired" XML message (the same one it does now). But the bad link was still there on my page until I flushed memcache.</p>
  
  <p>Here are the relevant settings:</p>
  
  <pre><code>COMPRESS_ENABLED = True
  
  STATICFILES_STORAGE = '[my app's name].storage.CachedS3BotoStorage' (a subclass of S3BotoStorage that is almost identical to the one from django-compressor's docs linked above)
  
  COMPRESS_STORAGE = STATICFILES_STORAGE
  
  COMPRESS_URL = STATIC_URL
  
  CACHES = {
    'default': {
      'BACKEND': 'django_pylibmc.memcached.PyLibMCCache',
      'LOCATION': 'localhost:11211',
      'TIMEOUT': 500,
      'BINARY': True,
    }
  }
  </code></pre>
  
  <p>Here is the error:</p>
  
  <pre><code>&lt;Error&gt;
  &lt;Code&gt;AccessDenied&lt;/Code&gt;
  &lt;Message&gt;Request has expired&lt;/Message&gt;
  &lt;RequestId&gt;81A63F24378ECB5E&lt;/RequestId&gt;
  &lt;Expires&gt;2012-09-18T18:39:02Z&lt;/Expires&gt;
  &lt;HostId&gt;lIr5l9Fna95DUfk6hUsWqhO5EQNn6Ayu8BatpEavis8YzLvsaJRru4O8P/50pgMy&lt;/HostId&gt;
  &lt;ServerTime&gt;2012-09-18T18:59:51Z&lt;/ServerTime&gt;
  &lt;/Error&gt;
  </code></pre>