Table of Contents

LiteMage Cache Administration

This page is dedicated to the different functions, tools, and tricks available to administrators in LiteMage Cache.

Enabling LiteMage Administrative Privilege Browser Commands

There are three methods of enabling LiteMage administrative privilege browser commands for your Magento site. The one you choose to use will depend on the mode you would like LiteMage to be in at the time as well as the type of commands you would like access to.

The following are two methods of enabling debug-related browser commands on your Magento site.

All debug-related commands will contain “LITEMAGE_DEBUG”.

Enabling Debug Mode

By putting LiteMage in debug mode you are giving any IP that can access your site permission to use debug-related browser commands with regard to LiteMage. It is not recommended to do this unless your Magento site is only accessible by you at the time.

To enable Debug Mode, log in to the Magento Admin Panel and navigate to System → Configuration. Under “LITEMAGE CACHE” in the left side menu, click “LiteMage Configuration”. Under “Developer Testing” set Enable Debug to “Yes”.

Enable LiteMage For Certain IPs Only

By enabling LiteMage for certain IPs only, you are giving permission to use debug-related browser commands with regard to LiteMage to those specific IPs as well as disabling LiteMage for all other traffic to your site. This setting can be very useful for debugging.

To enable LiteMage for certain IPs only, log in to the Magento Admin Panel and navigate to System → Configuration. In the left hand side menu under “LITEMAGE CACHE”, click “LiteMage Configuration”. Under “Developer Testing” add the desired IPs to the Enable LiteMage Cache Only for Listed IPs field.

All Browser Commands

The following method will enable all available browser commands (including debug-related browswer commands).

Add Your IP to the Admin IPs List

This is the most direct and least obtrusive way of enabling administrative privilege browser commands for specific IPs. This can be less useful for debugging, as LiteMage will remain enabled for all visitors to your site.

To add your IP to the Admin IPs list, log in to the Magento Admin Panel and navigate to System → Configuration. In the left hand side menu under “LITEMAGE CACHE”, click “LiteMage Configuration”. Under “General Settings” add the desired IPs to the Admin IPs field.

All Administrative Privilege Browser Commands

The following is a complete list of LiteMage Administrative privilege browser commands along with their descriptions. You can use these commands (with the proper privileges) by adding them to the end of a LiteMage enabled URL in your browser's address bar.

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 cleaning, we have included a cleanlitemage.sh script in the admin/misc directory of your LSWS installation directory.

This script takes from one to three plus input parameters, which are as follows:

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.