wiki:Caching

# We are leveraging several levels of caching in our apps

  1. Server Side Caching using Redis.
    1. Using [Redis](https://pypi.python.org/pypi/redis/)
  1. Caching in the browser.
    1. Apache mod_headers and mod_expiry - read this [definitive guide.](http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/)
    2. And here's our normal policy, this goes in between the Directory directive in the virtualhosts config.

# Apache Rules

    <IfModule mod_expires.c>
          ExpiresActive On
          ExpiresByType text/html "access plus 1 seconds"
          ExpiresByType image/gif "access plus 120 minutes"
          ExpiresByType image/jpeg "access plus 120 minutes"
          ExpiresByType image/png "access plus 120 minutes"
          ExpiresByType text/css "access plus 60 minutes"
          ExpiresByType text/javascript "access plus 60 minutes"
          ExpiresByType application/x-javascript "access plus 60 minutes"
          ExpiresByType text/xml "access plus 60 minutes"
        ExpiresByType application/json "access plus 120 minutes"
    </IfModule>

The rules may be subjected to changes. Please add the changes to this page.

Last modified 4 years ago Last modified on 02/25/14 11:21:21