Commit 7f45c403 authored by robertDouglass's avatar robertDouglass
Browse files

Adding memcache.module (not useful until I provide patches for specific...

Adding memcache.module (not useful until I provide patches for specific caching targets, though). Rewrote the server cluster management code in dmemcache_object. Added some (sloppily coded) tests.
parent 670c4e7c
<?php
function memcache_taxonomy($op, $type, $object=NULL) {
if (is_null($object)) {
return;
}
$object = (array)$object;
switch ($type) {
case 'term':
$key = $object['tid'];
break;
case 'vocabulary':
$key = $object['vid'];
break;
// we only know how to handle 'term' and 'vocabulary', so return otherwise.
default:
return;
}
switch ($op) {
case 'delete':
case 'update':
drupal_mc_delete($key, 'taxonomy_get_tree', TRUE);
drupal_mc_delete($key, $type);
}
}
function memcache_nodeapi($node, $op) {
switch ($op) {
case 'insert':
case 'update':
case 'delete':
//drupal_mc_delete($node->nid, 'node');
}
}
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