This is an old revision of the document!


Advanced Configuration Options for LSCache Storage and Policy Settings

Setting Cache Root to a RAM Disk

To use a per user cache directory in RAM, an absolute path must be specified, such as

CacheRoot /dev/shm/lscache/user1

Note: Be careful not to use the same cache directory for two accounts as this is likely to cause trouble.

Setting Virtual Host Cache Root Using Variables

LiteSpeed Web Server supports variables in the Virtual Host cache root configuration when using an Apache configuration file. For example:

/dev/shm/lscache/$vh_name

/dev/shm/lscache/$vh_domain

/dev/shm/lscache/$vh_user

The variables are based on the virtual host configuration. For Apache VHosts, $vh_name is the same as $vh_domain which is the ServerName for that VHost.

Cache Policy Settings

You can fine tune your cache policy settings at the Server,Virtual Host, or Context level by logging in to the LiteSpeed Web Server WebAdmin Console and navigating to

Server Level: Configuration » Server » Cache

Virtual Host Level: Configuration » Virtual Hosts » <vh_name> » Cache

Context Level: Configuration » Virtual Hosts » <vh_name> » Context » <context_name>

As our default settings work well with most caching scenarios, it is not common to have to change any of these settings.

  • Admin
  • Last modified: 2016/05/05 18:17
  • by Michael Alegre