In this recipe, we will use the Apache module Expires in order to maximize the cache utilization.
Open the file named .htaccess
in the home directory of Magento and go to line 181. Modify lines 181 through 189 so that it looks like the following:
<IfModule mod_expires.c> ############################################ ## Add default Expires header ## http://developer.yahoo.com/performance/rules.html#expires ExpiresActive On ExpiresDefault "access plus 1 month" </IfModule>
The Apache Expires module controls the HTTP header named Expires
. These headers are used to inform the client about the document's validity and persistence. If the requested document is present in one of our cache systems, it will be provided from the cache rather than the filesystem. After a fixed amount of time, one month in this case, the copy is considered expired and a new copy has to be copied into the cache from the original source.