Store a reference to the cache key against the reference key.

@param  string $namespace
@param  string $key
@param  string $reference
519548
protected function pushKeys( $namespace, $key, $reference )
	{
		$fullKey = $this->getPrefix() . sha1( $namespace ) . ':' . $key;

		foreach ( explode( '|', $namespace ) as $segment )
		{
			$this->store->connection()->sadd( $this->referenceKey( $segment, $reference ), $fullKey );
		}
	}
1057981
public function put($locale, $group, $namespace, $content, $minutes)
    {
        $key = $this->getKey($locale, $group, $namespace);
        $this->store->put($key, $content, $minutes);
    }
812332
private function trackReference(string $key)
    {
        if (!in_array($key, $this->columns)) {
            throw new NodeException("Unable to create reference, key {$key} does not exist");
        }

        if (!in_array($key, $this->trackReferences)) {
            //We are only tracking unique references
            $this->trackReferences[] = $key;
        }
    }
772277
public function forget(string $key)
    {
        $cacheKey = $this->cacheKeys[$key] ?? null;
        if (!empty($cacheKey)) {
            Cache::forget($cacheKey);
        }
    }
728900
public function addReferenceCache($reference)
    {
        if ( !$cache = $this->getMongator()->getFieldsCache() ) {
            return null;
        }

        foreach ($this->getQueryHashes() as $hash) {
            $value = $cache->get($hash);
            if (!$value) $value = array();

            if (!isset($value['references']) || !in_array($reference, $value['references'])) {
                $value['references'][] = $reference;
                $cache->set($hash, $value);
            }
        }
    }
820523
public function lock($key)
    {
        $this->logger->info("[Filesystem cache] Lock '$key'");

        $lockFile = $this->fixKey($key) . ".lock";

        try {
            file_put_contents($lockFile, date('c'));
        } catch (Exception $ex) {
            // Ignoring... Set will cause an error
        }
    }
473255
public function setNamespace($namespace)
    {
        if (is_string($namespace) === false) {
            $msg = "The namespace argument must be a string.";
            throw new InvalidArgumentException($msg);
        } elseif ($namespace === '') {
            $msg = "The namespace argument must be a non-empty string.";
            throw new InvalidArgumentException($msg);
        } else {
            $this->namespace = $namespace;
        }
    }
114664
public function setNameSpace($nameSpace)
    {
        $this->paginationPageParameter .= '_' . $nameSpace;
        $this->sortColumnParameter .= '_' . $nameSpace;
        $this->sortDirectionParameter .= '_' . $nameSpace;
    }
239644
public function setKey($key)
    {
        $this->key = $key;
        $this->driver->setNamespace($this->key);
    }
986939
protected function remember(string $cacheKey, string $name, array $arguments)
    {
        $cache = Cache::get($cacheKey);
        if ($cache) {
            return $cache;
        }

        $result = call_user_func_array([$this->repository, $name], $arguments);
        $driver = $this->repository->getDriver();
        if ($result instanceof $driver) {
            return $result;
        }

        if (!is_null($result)) {
            Cache::put($cacheKey, $result, $this->cacheMinute);
        }

        return $result;
    }
364521
public function delete($key, $partition = null)
    {
        if (!$partition) {
            $partition = $this->namespace;
        }
        $key = $this->addNamespace($key, $partition);
        if (!@unlink($key)) {
            throw new CacheException('Could not delete cache key');
        }
    }
1024056
public function getReference($key)
    {
        if (isset($this->references[$key])) {
            return $this->references[$key];
        }

        return null; // just to be explicit
    }
925834
public function set($namespace, \Tx_Oelib_Configuration $configuration)
    {
        $this->checkForNonEmptyNamespace($namespace);

        if (isset($this->configurations[$namespace])) {
            $this->dropConfiguration($namespace);
        }

        $this->configurations[$namespace] = $configuration;
    }
1221496
private function referenceToEntity(&$item, $key) {
    if ($this->isASleepingReference) {
      $this->referenceWake();
    }
    if (is_array($item)) {
      if (isset($item[0]) && $item[0] === 'nymph_entity_reference') {
        if (!isset($this->entityCache["referenceGuid__{$item[1]}"])) {
          if (!class_exists($item[2])) {
            throw new Exceptions\EntityClassNotFoundException(
                "Tried to load entity reference that refers to a class that ".
                "can't be found, {$item[2]}."
            );
          }
          $this->entityCache["referenceGuid__{$item[1]}"] =
              call_user_func([$item[2], 'factoryReference'], $item);
        }
        $item = $this->entityCache["referenceGuid__{$item[1]}"];
      } else {
        array_walk($item, [$this, 'referenceToEntity']);
      }
    } elseif (is_object($item)
              && !(
                (
                  is_a($item, '\Nymph\Entity')
                  || is_a($item, '\SciActive\HookOverride')
                )
                && is_callable([$item, 'toReference'])
              )) {
      // Only do this for non-entity objects.
      foreach ($item as &$curProperty) {
        $this->referenceToEntity($curProperty, null);
      }
      unset($curProperty);
    }
  }
1247172
public function forget($key)
        {
            $this->_cleanCache();
            $res = Data::query('cache', 'key = ' . $key . ' && namespace = ' . $this->namespace);
            if (count($res)) {
                $obj = Data::getObject(current($res));
                $del = Data::delete('cache', $obj->getId());
            }
        }
764114
public function addReferenceCache($reference)
    {
        $cache = $this->getMandango()->getCache();

        foreach ($this->getQueryHashes() as $hash) {
            $value = $cache->has($hash) ? $cache->get($hash) : array();
            if (!isset($value['references']) || !in_array($reference, $value['references'])) {
                $value['references'][] = $reference;
                $cache->set($hash, $value);
            }
        }
    }
371093
protected function update($namespace, $config) {
		foreach ($config as $k => $v) {
			if (strpos($k, '.') === false) {
				$this->cache[$namespace][$k] = $v;
				continue;
			}
			$keys = explode('.', $k);
			$total = count($keys) - 1;
			$parent = &$this->cache[$namespace];
			foreach ($keys as $kk => $vv) {
				if ($total === $kk) {
					$parent[$vv] = $v;
				} else {
					if (!isset($parent[$vv])) {
						$parent[$vv] = [];
					}
					$parent = &$parent[$vv];
				}
			}
		}
	}