Elgg  Version 2.3
memcache.php
Go to the documentation of this file.
1 <?php
17  return (bool) _elgg_services()->memcacheStashPool;
18 }
19 
29  _elgg_get_memcache('new_entity_cache')->delete($entity_guid);
30 }
31 
40 function _elgg_get_memcache($namespace = 'default') {
41  static $caches = array();
42 
43  $cache_pool = _elgg_services()->memcacheStashPool;
44  if (!$cache_pool) {
45  return _elgg_services()->nullCache;
46  }
47 
48  if (!isset($caches[$namespace])) {
49  $caches[$namespace] = new ElggMemcache($namespace, $cache_pool);
50  }
51  return $caches[$namespace];
52 }
_elgg_get_memcache($namespace= 'default')
Get a namespaced ElggMemcache object (if memcache is available) or a null cache.
Definition: memcache.php:40
Memcache wrapper class.
Definition: ElggMemcache.php:6
_elgg_invalidate_memcache_for_entity($entity_guid)
Invalidate an entity in memcache.
Definition: memcache.php:28
$entity_guid
Definition: save.php:9
is_memcache_available()
Return true if memcache is available and configured.
Definition: memcache.php:16
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
Definition: autoloader.php:17