Username Password
Bookmark and Share


CHI -- Faster caching for WebGUI 7

User preaction
Date 4/29/2010 12:58 pm
Views 1616
Rating 3    Rate [
Previous · Next
User Message

Last week, I added the CHI driver as WebGUI 8's caching mechanism. CHI is an interface to multiple caching backends, including DBI, Memcached, and FastMmap. Depending on the cache backend (FastMmap being the fastest I've tested), you can get at least a 30% performance increase from WebGUI's database cache.

This week, I've ported a CHI driver for WebGUI 7. Though it is included as part of 7.9, it should work with any WebGUI 7 version.

To use, unzip the attached archive to your /data/WebGUI directory. This will replace the existing lib/WebGUI/ and create lib/WebGUI/Cache/ (so remember to keep this package's lib/WebGUI/ when you upgrade).

Next, install the CHI module from CPAN. If you want to use FastMmap or Memcached, you must also install their prerequisites:

  • FastMmap --
  • Memcached --

Finally, update your site configuration:

"cacheType" : "WebGUI::Cache::CHI",
"cache" : {
    "driver" : "FastMmap",
    "root_dir" : "/tmp/WebGUI_CHI",
    "expires_variance" : "0.10"

The "cache" config hash is the CHI configuration.
"driver" is the driver to use, either "FastMmap" or "Memcached::libmemcached". 
"root_dir" is for FastMmap, a place to store the mmap files. Make sure you don't use /tmp/WebGUICache to avoid permissions issues with WebGUI's FileCache.
"servers" is for Memcached, and is an array of server addresses, like [ "", "" ]

Attached Files
Back to Top
Rate [

© 2019 Plain Black Corporation | All Rights Reserved