title: Apache Caching JS CSS Files
body: <p>I have enabled mod_cache, mod_expires, mod_headers modules in my httpd.conf and also added following text</p>
  
  <pre><code> ExpiresActive On
  
  
  &lt;ifModule mod_deflate.c&gt;
    &lt;filesMatch "\.(css|js|x?html?|php)$"&gt;
      SetOutputFilter DEFLATE
    &lt;/filesMatch&gt;
  &lt;/ifModule&gt;
  
  
  
  &lt;ifModule mod_expires.c&gt;
    ExpiresActive On
    ExpiresDefault "access plus 1 seconds"
    ExpiresByType image/x-icon "access plus 2592000 seconds"
    ExpiresByType image/jpeg "access plus 2592000 seconds"
    ExpiresByType image/png "access plus 2592000 seconds"
    ExpiresByType image/gif "access plus 2592000 seconds"
    ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
    ExpiresByType text/css "access plus 604800 seconds"
    ExpiresByType text/javascript "access plus 216000 seconds"
    ExpiresByType application/javascript "access plus 216000 seconds"
    ExpiresByType application/x-javascript "access plus 216000 seconds"
    ExpiresByType text/html "access plus 600 seconds"
    ExpiresByType application/xhtml+xml "access plus 600 seconds"
  &lt;/ifModule&gt;
  
  
  
  &lt;ifModule mod_headers.c&gt;
    &lt;filesMatch "\.(ico|jpe?g|png|gif|swf)$"&gt;
      Header set Cache-Control "max-age=2592000, public"
    &lt;/filesMatch&gt;
    &lt;filesMatch "\.(css)$"&gt;
      Header set Cache-Control "max-age=604800, public"
    &lt;/filesMatch&gt;
    &lt;filesMatch "\.(js)$"&gt;
      Header set Cache-Control "max-age=216000, public"
    &lt;/filesMatch&gt;
    &lt;filesMatch "\.(x?html?|php)$"&gt;
      Header set Cache-Control "max-age=600, public"
    &lt;/filesMatch&gt;
  &lt;/ifModule&gt;
  
  
  
  &lt;ifModule mod_headers.c&gt;
    Header unset ETag
  &lt;/ifModule&gt;
  FileETag None
  
  
  
  &lt;ifModule mod_headers.c&gt;
    Header unset Last-Modifiedd
  &lt;/ifModule&gt;
  
  
  &lt;IfModule mod_cache.c&gt;
  
  LoadModule mem_cache_module modules/mod_mem_cache.so
  &lt;IfModule mod_mem_cache.c&gt;
  CacheEnable mem /
  MCacheSize 4096
  MCacheMaxObjectCount 100
  MCacheMinObjectSize 1
  MCacheMaxObjectSize 2048
  &lt;/IfModule&gt;
  &lt;/IfModule&gt; 
  </code></pre>
  
  <p>but files are not caching. I get headers information like</p>
  
  <pre><code> Response
  Date    Tue, 23 Aug 2011 11:30:09 GMT
  Server  Apache/2.2.19 (Win32) PHP/5.3.6
  Last-Modified   Mon, 22 Aug 2011 21:24:19 GMT
  Accept-Ranges   bytes
  Cache-Control   max-age=216000, public
  Expires Thu, 25 Aug 2011 23:30:09 GMT
  Vary    Accept-Encoding
  Content-Encoding    gzip
  Content-Length  2875
  Keep-Alive  timeout=5, max=100
  Connection  Keep-Alive
  Content-Type    application/javascript
  
  Request Headers
  
  Host    workflowsf.com
  User-Agent  Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1
  Accept  */*
  Accept-Language en-us,en;q=0.5
  Accept-Encoding gzip, deflate
  Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Keep-Alive  115
  Connection  keep-alive
  </code></pre>
  
  <p>Have u any idea where I am wrong?
  Thanks in advance</p>