Every website wants to enable the caching so that site is loaded faster and saves the bandwidth. Following is the code which can be added to the .htaccess file (with apache).
## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
<FilesMatch "\.(ico|jpg|jpeg|png|gif)$">
ExpiresDefault "access plus 2 weeks"
</FilesMatch>
<FilesMatch "\.(js|css|swf)$">
ExpiresDefault "access plus 2 weeks"
</FilesMatch>
</IfModule>
## EXPIRES CACHING ##
Possible values of ExpiresDefault
ExpiresDefault "access plus 1 month"
ExpiresDefault "access plus 4 weeks"
ExpiresDefault "access plus 30 days"
Note: Above code is running at QueryHome.