WP LCache Wordpress Plugin - Rating, Reviews, Demo & Download
Plugin Description
For sites concerned with high traffic, speed for logged-in users, or dynamic pageloads, a high-speed and persistent object cache is a must. WP LCache improves upon Memcached and Redis object cache implementations by using APCu, PHP’s in-memory cache, in a way that’s compatible with multiple web nodes. Under the hood, WP LCache uses LCache, a library that applies the tiered caching model of multi-core processors (with local L1 and central L2 caches) to web applications.
Note: WP LCache development is currently on hold, and not recommendated for production use, due to an issue with APCu cache fragmentation. WP Redis, also maintained by Pantheon, is a great alternative.
WP LCache is faster than other object cache implementations because:
- By using APCu, which is in-memory, WP LCache uses the fastest possible persistent object cache backend and avoids costly network connections on every request. When using a Memcached or Redis-based persistent object cache where Memcached or Redis is on a different machine, the millisecond cost of each cache hit can add up to seconds of network transactions on every request.
- By incorporating a common L2 cache, WP LCache synchronizes cache data between multiple web nodes. Cache updates or deletes on one node are then applied to all other nodes. Without this synchronization behavior, APCu can’t be used in server configurations with multiple web nodes because the cache pool is local to the machine.
Still not convinced? WP LCache includes features that no one else has:
- Cache groups are handled natively, meaning you can delete an entire group of keys with
wp_cache_delete_group()
. - WordPress’ alloptions cache is sharded into distinct keys, mitigating cache pollution on high traffic sites. Read #31245 for all of the gory details.
Read the installation instructions, then install WP LCache from WordPress.org or Github.
Go forth and make awesome! And, once you’ve built something great, send us feature requests (or bug reports).
Contributing
The best way to contribute to the development of this plugin is by participating on the GitHub project:
https://github.com/lcache/wp-lcache
Pull requests and issues are welcome!
You may notice there are two sets of tests running, on two different services:
- Travis CI runs the PHPUnit test suite in a variety of environment configurations (e.g. APCu available vs. APCu unavailable).
- Circle CI runs the Behat test suite against a Pantheon site, to ensure the plugin’s compatibility with the Pantheon platform.
Both of these test suites can be run locally, with a varying amount of setup.
PHPUnit requires the WordPress PHPUnit test suite, and access to a database with name wordpress_test
. If you haven’t already configured the test suite locally, you can run bash bin/install-wp-tests.sh wordpress_test root '' localhost
. You’ll also need to install and configure APCu in order to run the test suite against APCu.
Behat requires a Pantheon site. Once you’ve created the site, you’ll need install Terminus, and set the TERMINUS_TOKEN
, TERMINUS_SITE
, and TERMINUS_ENV
environment variables. Then, you can run ./bin/behat-prepare.sh
to prepare the site for the test suite.
Screenshots
No screenshots provided