|
You are here: Home / Documentation / Sitellite and memcached |
Sitellite and memcachedRunning memcachedNow that memcached is installed onto your server, you should be able to run the memcached server daemon, also from the Unix command-line. For the purposes of this article, I started memcached on my server with the following command:$ memcached -d -p 11211This makes memcached run as a daemon, listening on port 11211. For a list of options, try: $ memcached -h Installing the memcached PHP APIIn the folder inc/app/myapp/lib, drop the file MemCachedClient.inc.php, which you can download from the memcached web site. You will likely need to create the folders below inc/app yourself, as I'm trying to encourage you to work within your own app structure in Sitellite, instead of modifying existing source code. This helps improve reusability and maintainability of your custom code.You should also rename the file to be simply MemCachedClient.php (no ".inc"). A Simple BoxCreate a new file called inc/app/myapp/boxes/latestheadlines/index.php and paste the following code into it:<?phpNow you can create a sidebar with a box alias of "myapp/latestheadlines" to display the top 10 headlines on your web site. Next: Adding memcached to the Mix Page 1: Installing memcached |
|
Copyright © 2008, SIMIAN systems Inc. All rights reserved. Privacy policy Some of the icons on this site were created by the Gnome Project. |