LSMCD Usage Example

LSMCD can be used the same way you would use Memcached. Instead of installing Memcached, install LSMCD according the steps mentioned on our installation page.

You should have PHP configured for your web server (this can be any web server, not just LiteSpeed Web Server). Also the php-memcached pecl extension should be installed and enabled in PHP. To use LSMCD, you can use the same syntax as Memcached in applications.

For example, to enable Memcached for a Magento store, you will need to add a <cache></cache> section within your <global></global> section in “app/etc/local.xml”. Something like the following:

          <backend>memcached</backend><!-- apc / memcached / xcache / empty=file -->
              <connection></connection> <!-- Custom connection for db backend -->
              <enable_two_levels>true</enable_two_levels> <!-- Enable two level cache -->
          <slow_backend>database</slow_backend> <!-- database / file (default) - used for 2 levels cache setup, necessary for all shared memory storages -->
          <slow_backend_store_data></slow_backend_store_data> <!-- 1 / 0 (default) - used for 2 levels cache setup, sets whether store data in db slow cache backend -->
          <auto_refresh_fast_cache></auto_refresh_fast_cache> <!-- 1 / 0 (default) - used for 2 levels cache setup, sets whether refresh data in fast cache backend -->
          <Memcached><!-- memcached cache backend related config -->
              <servers><!-- any number of server nodes can be included -->

Do you need to change “memcached” to “LSMCD”? Absolutely not. The above setup will make Magento stores call “LSMCD” directly. The same syntax makes LSMCD work out of your existing box if you have setup Memcached for your applications.

litespeed_wiki/lsmcd/use_case.txt · Last modified: 2016/04/14 14:15 by Rob Holda