You are here

function ad_memcache_init in Advertisement 5.2

Same name and namespace in other branches
  1. 5 cache/memcache/ad_cache_memcache.inc \ad_memcache_init()
  2. 6 cache/memcache/ad_cache_memcache.inc \ad_memcache_init()

Decrement a numerical value in memcache. TODO: Use the same configuration style as Drupal's memcache module, supporting multiple memcache servers, etc.

7 calls to ad_memcache_init()
ad_cache_memcache_requirements in cache/memcache/ad_cache_memcache.module
@file A plug in for the ad.module, integrating the ad module with memcache.
ad_memcache_add in cache/memcache/ad_cache_memcache.inc
Store a value in memcache.
ad_memcache_decrement in cache/memcache/ad_cache_memcache.inc
Decrement a numerical value in memcache.
ad_memcache_delete in cache/memcache/ad_cache_memcache.inc
Delete a value from memcache.
ad_memcache_get in cache/memcache/ad_cache_memcache.inc
Get a value from memcache.

... See full list

File

cache/memcache/ad_cache_memcache.inc, line 341

Code

function ad_memcache_init() {
  static $memcache = NULL;
  if (!$memcache) {
    $memcache = new Memcache();
    $memcache
      ->addServer('localhost', 11211);
  }
  return $memcache;
}