Differences

This shows you the differences between two versions of the page.

Link to this comparison view

litespeed_wiki:cache:litemage:troubleshooting:clean-up [2016/05/06 13:23]
Michael Alegre created
litespeed_wiki:cache:litemage:troubleshooting:clean-up [2018/05/01 15:49]
Lisa Clarke Added link to new cache storage page, rephrased & reformatted a bit
Line 1: Line 1:
 ====== LiteMage Cache Cleanup ====== ====== LiteMage Cache Cleanup ======
  
-Like most caches, LiteMage Cache needs to be periodically cleaned to prevent the cache storage from growing too large. Deleting these files by flushing the cache through Magento could slow down your site and it would instead be preferable to do this cleaning in a separate process. To this end LiteMage ​will only mark files as "​expired" ​when the cache is flushed instead of deleting them outright. ​To do the actual cleaningwe have included a **cleanlitemage.sh** script ​in the ''​admin/​misc''​ directory of your LSWS installation directory.+Like most caches, LiteMage Cache needs to be periodically cleaned to prevent the cache storage from growing too large. Deleting these files by flushing the cache through Magento could slow down your site and it would instead be preferable to do this cleaning in a separate process. To this end, when the cache is flushed, ​LiteMage only marks files as "​expired" ​rather than deleting them outright. ​LiteSpeed Web Server [[litespeed_wiki:​cache:​cache-storage|periodically cleans up the storage directory]] and deletes cache entries that have reached their natural expiration datebut it does not apply to these entries that have been marked as "​expired"​ through flushingFor that you can use our script.
  
-This script ​takes from one to three plus input parameters, which are as follows:+We have included a ''​cleanlitemage.sh'' ​script ​in the ''​admin/​misc''​ directory of your LSWS installation directory.
  
-  * ''​**-priv <​age_mins>​**''​ - **(Optional)** - Determines ​the maximum age (in minutes) of items stored in the private cache. The default value is 60 minutes. If set, value must be greater than 0.  +This script takes the following input parameters:
-  * ''​**-pub <​age_mins>​**''​ - **(Optional)** - Determines the maximum age (in minutes) of items stored in the public cache. The default value is 0, meaning public cache will not be purged. If set, value must be greater than 10. +
-  * ''​**<​litemage_cache_dir1>​ ... <​litemage_cache_dir9>​**''​ - **(Required)** - Specifies one or more LiteMage cache storage directories separated by spaces. Each directory must contain the ''/​priv''​ directory.+
  
-**Note:** The values (in minutes) used for ''​**-priv**''​ and ''​**-pub**''​ should be set higher than **Default Private Cache TTL (seconds)** and **Default Public Cache TTL (seconds)** in LiteMage'​s Configuration settings in the Magento Admin Panel. This will ensure that you are only purging expired files. ​+  * ''​-priv <​age_mins>''​ - **(Optional)** - Determines the maximum age (in minutes) of items stored in the private cache. The default value is 60 minutes. If set, value must be greater than 0.  
 +  * ''​-pub <​age_mins>''​ - **(Optional)** - Determines the maximum age (in minutes) of items stored in the public cache. The default value is 0, meaning public cache will not be purged. If set, value must be greater than 10. 
 +  * ''<​litemage_cache_dir1>​ ... <​litemage_cache_dir9>''​ - **(Required)** - Specifies one or more LiteMage cache storage directories separated by spaces. Each directory must contain the ''/​priv''​ directory. 
 + 
 +**Note:** The values (in minutes) used for ''​-priv''​ and ''​-pub''​ should be set higher than **Default Private Cache TTL (seconds)** and **Default Public Cache TTL (seconds)** in LiteMage'​s Configuration settings in the Magento Admin Panel. This will ensure that you are only purging expired files. ​
  
 **Tip:** Once you have found a combination of settings that keeps your cache size reasonable, you can then include this script in a cron job to automate the process. ​ **Tip:** Once you have found a combination of settings that keeps your cache size reasonable, you can then include this script in a cron job to automate the process. ​
  • Admin
  • Last modified: 2018/05/01 15:49
  • by Lisa Clarke