You are here

public function CacheBase::getKey in Redis 8

Return the key for the given cache key.

5 calls to CacheBase::getKey()
CacheBase::deleteAll in src/Cache/CacheBase.php
Deletes all cache items in a bin.
CacheBase::getLastDeleteAll in src/Cache/CacheBase.php
Returns the last delete all timestamp.
CacheBase::invalidateMultiple in src/Cache/CacheBase.php
Marks cache items as invalid.
PhpRedis::set in src/Cache/PhpRedis.php
Stores data in the persistent cache.
Predis::set in src/Cache/Predis.php
Stores data in the persistent cache.

File

src/Cache/CacheBase.php, line 214

Class

CacheBase
Base class for redis cache backends.

Namespace

Drupal\redis\Cache

Code

public function getKey($cid = NULL) {
  if (NULL === $cid) {
    return $this
      ->getPrefix() . ':' . $this->bin;
  }
  else {
    return $this
      ->getPrefix() . ':' . $this->bin . ':' . $cid;
  }
}