I keep failing the cache test here with every site I try (although some of them are scoring 100% on pingdom tools). Here is the htaccess code I’m currently using:
Header unset FileETag
FileETag none
<IfModule mod_expires.c>
<IfModule mod_headers.c>
ExpiresActive On
ExpiresDefault "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType text/css "access plus 4 hour"
ExpiresByType application/javascript "access plus 1 year"
<FilesMatch \.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$ >
ExpiresDefault "access plus 3 month"
Header append Cache-Control public
</FilesMatch>
<FilesMatch \.(gif|jpg|jpeg|png|swf)$ >
ExpiresDefault a3019200
Header append Cache-Control public
</FilesMatch>
<FilesMatch \.(xml|txt|html|js|css)$ >
Header append Cache-Control proxy-revalidate
</FilesMatch>
<FilesMatch \.(php|cgi|pl|htm)$ >
ExpiresActive Off
Header set Cache-Control= no-cache
Header set Pragma no-cache
</FilesMatch>
</IfModule>
</IfModule>