About Sitellite       Screenshots       Downloads       Forge      Documentation       Community       Support

You are here: Home / Documentation / Sitellite and memcached

Sitellite and memcached

As a continuation of the previous article about performance caching in Sitellite, I'd like to introduce a really cool caching solution, and to show how easy it is to integrate this solution into Sitellite-based applications.  The solution in question is called memcached, and it's made by the same folks who brought you LiveJournal.com.  In fact, the original inspiration for memcached was LiveJournal.com itself.

On the memcached web site (http://www.danga.com/memcached/), they describe the application succinctly as follows:
"memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load."
I won't bother to paraphrase that myself, since it's sufficiently obvious what the goal of it is.  Suffice it to say that memcached is an elegant solution to the problem of caching partial web site content for the purposes of relieving database loads (see the "Partial-page caching" and "Query-level caching" sections in my article "Performance: Sitellite Content Caching").

Installing memcached

memcached requires the libevent package, which you can learn about and download here:

http://www.monkey.org/~provos/libevent/

The installation procedure, which will be familiar to most Unix developers, is as follows:
$ tar -zxvf libevent-0.8.tar.gz
$ cd libevent-0.8
$ ./configure
$ make
$ su
(enter password when prompted)
# make install
# exit
I recommend reading the installation instructions provided with libevent yourself prior to installing it, which provide a greater overview of the steps shown above.

Next, you will need to download and install memcached itself, which is availabel here:

http://www.danga.com/memcached/

The commands to install memcached are as follows:
$ tar -zxvf memcached-1.1.10.tar.gz
$ cd memcached-1.1.10
$ ./configure
$ make
$ su
(enter password when prompted)
# make install
# exit
As with libevent, be sure to read up on memcached's own provided installation instructions prior to following the ones above.  How does that saying go?  "Do as I say, not as I do."  Yes, always read the instructions. :)

Next: Running memcached

Page 1: Installing memcached
Page 2: Running memcached
Page 3: Adding memcached to the Mix

All Tutorials

Members

Note: You can use your SitelliteForge.com account here and vice versa.

Username

Password

Forgot your password?

Not a member? Click here to register

Sitellite 5 Beta


Copyright © 2008, SIMIAN systems Inc.
All rights reserved. Privacy policy
Some of the icons on this site were created by the Gnome Project.