Note: This page describes an easy way to set up simple caching for Magento installations. With the release of LiteMage Cache, though, this solution is now deprecated. Click here for the LiteMage Cache installation and configuration manual.
It is rather simple to have LSWS Cache and Magento work together. LSWS enable private cache and define URL pattern not to be cached.
Here are the steps that will enable LSWS to work with Mangento:
In LiteSpeed (v4.1.2 or later) Admin CP → Configuration → Server → Cache
Storage Path: /diskcache Max Object Size: 128K Cache Policy Enable Cache: No Cache Expire Time (seconds): Not Set Cache Request with Query String: No Cache Request with Cookie: No Cache Response with Cookie: No Ignore Request Cache-Control: No Ignore Response Cache-Control: No Enable Private Cache: Yes Private Cache Expire Time (seconds): 60
/checkout/ /admin /customer /downloader
*/10 * * * * find /diskcache -type f -mmin +10 –delete
Note: This cron job clean up stale cache storage every 10 minutes.
echo "mkdir /diskcache && chmod nobody.lsadm" >> /etc/rc.local echo "/diskcache && chmod 770 /diskcache" >> /etc/rc.local
Note: this is to make sure cache directory gets created when server is booted up.