ElggMemcache::delete PHP Method

delete() public method

Delete data
public delete ( string $key ) : boolean
$key string Name of data
return boolean
    public function delete($key)
    {
        $key = $this->makeMemcacheKey($key);
        return $this->stash_pool->getItem($key)->clear();
    }

Usage Example

Esempio n. 1
0
/**
 * Invalidate an entity in memcache
 *
 * @param int $entity_guid The GUID of the entity to invalidate
 *
 * @return void
 * @access private
 */
function _elgg_invalidate_memcache_for_entity($entity_guid)
{
    static $newentity_cache;
    if (!$newentity_cache && is_memcache_available()) {
        $newentity_cache = new \ElggMemcache('new_entity_cache');
    }
    if ($newentity_cache) {
        $newentity_cache->delete($entity_guid);
    }
}
All Usage Examples Of ElggMemcache::delete