Back to MemcachedStorage class

Method contains

public bool
contains
(mixed $id, mixed $group)
Check if the cache contains data stored by ID and group
Parameters
  • string $id The cache data ID
  • string $group The cache data group
Returns
  • bool
Since
  • 3.7.0

Method contains - Source code

/**
 * Check if the cache contains data stored by ID and group
 *
 * @param   string  $id     The cache data ID
 * @param   string  $group  The cache data group
 *
 * @return  boolean
 *
 * @since   3.7.0
 */
public function contains($id, $group)
{
    static::$_db->get($this->_getCacheId($id, $group));
    return static::$_db->getResultCode() !== \Memcached::RES_NOTFOUND;
}