Commit 2d8cab74 authored by robertDouglass's avatar robertDouglass

Id's all around

parent 71548cff
// $Id$
Fedora memcache + drupal walkthrough
1) Have a look at the background reading
A - http://www.danga.com/memcached/ (cache daemon)
B - http://pecl.php.net/package/memcache (PHP integration for memcache)
......@@ -26,13 +28,13 @@ Fedora memcache + drupal walkthrough
1010 yum install php-devel
1011 rpmbuild --rebuild php-pecl-memcache-2.0.4-1.rf.src.rpm
3) Installed RPMS
3) Installed RPMS
[root@yoursite ~]# rpm -Uvh /usr/src/redhat/RPMS/x86_64/memcached-1.2.1-4.rf.x86_64.rpm /usr/src/redhat/RPMS/x86_64/php-pecl-memcache-2.0.4-1.rf.x86_64.rpm
Preparing... ########################################### [100%]
1:php-pecl-memcache ########################################### [ 50%]
2:memcached ########################################### [100%]
[root@yoursite ~]#
[root@yoursite ~]#
4) Verify configuration. Change if required.
......@@ -51,7 +53,7 @@ Starting Distributed memory caching (memcached): [ OK ]
[root@yoursite ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@yoursite ~]#
[root@yoursite ~]#
Check phpinfo() for memcached status. Mine said
......@@ -85,7 +87,7 @@ whole $cfg. The example below uses the default localhost:11211 server.
$conf = array(
'memcache_inc' => './includes/memcache.inc',
);
[simon@yoursite memcache]$
[simon@yoursite memcache]$
8) Enable the drupal module from /admin/build/modules (it's in the "Other"
section)
// $Id$
## INSTALLATION ##
To install, move memcache.inc to your DRUPAL/includes directory (where the
......@@ -48,14 +50,14 @@ bins go to 'default'.
$conf = array(
'cache_inc' => './includes/memcache.inc',
'memcache_servers' => array('localhost:11211' => 'default',
'localhost:11212' => 'default',
'123.45.67.890:11211' => 'default',
'123.45.67.891:11211' => 'cluster2',
'memcache_servers' => array('localhost:11211' => 'default',
'localhost:11212' => 'default',
'123.45.67.890:11211' => 'default',
'123.45.67.891:11211' => 'cluster2',
'123.45.67.892:11211' => 'cluster2'),
'memcache_bins' => array('cache' => 'default',
'cache_filter' => 'cluster2',
'memcache_bins' => array('cache' => 'default',
'cache_filter' => 'cluster2',
'cache_menu' => 'cluster2'),
);
......
<?php
// $ID$
// $Id$
global $_memcache_statistics;
$_memcache_statistics = array('get' => array(), 'set' => array(), 'hit' => array());
......
<?php
// $Id$
/**
* Add serialized field to cache tables
......
// $Id$
// Global Killswitch
if (Drupal.jsEnabled) {
$(document).ready(function() {
......
<?php
// $Id$
function memcache_init() {
if (strstr($_SERVER['PHP_SELF'], 'update.php') || strstr($_GET['q'], 'autocomplete')) {
......
<?php
// $ID$
// $Id$
/*
* Some unit tests used while developing. You may find them instructional.
......@@ -395,4 +395,4 @@ function formatStats2($mc1, $mc2, $flush = FALSE) {
print "<tr><td>$count</td><td>". $stats1['bytes']. "</td><td>". $stats2['bytes']. "</td></tr>";
$count++;
}
?>
\ No newline at end of file
?>
......@@ -126,7 +126,7 @@ function sess_regenerate() {
/**
* Counts how many users have sessions. Can count either anonymous sessions, authenticated sessions, or both.
* Would be insane slow with memcached as we would need to retrieve at least the stats of all object.
* Would be insane slow with memcached as we would need to retrieve at least the stats of all object.
* Not implemented.
*/
function sess_count($timestamp = 0, $anonymous = true) {
......@@ -156,4 +156,4 @@ function sess_gc($lifetime) {
// to '1814400'. At that value, only after a user doesn't log in after
// three weeks (1814400 seconds) will his/her session be removed.
return TRUE;
}
\ No newline at end of file
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment