Get the key for this item in the cache

@param type $perm
@return string
10706
public function permCacheKey(DataObject $node)
    {
        if ($node && $node->ID) {
            return self::ITEM_PREFIX . $this->idStr($node);
        }
    }
1246244
protected function key($field)
    {
        if (method_exists($this->model, 'getTrueKey')) {
            return $this->model->getTrueKey($field);
        }

        return $field;
    }
1103446
public function get($num)
    {
        if (isset($this->cache[$num])) {
            return $this->cache[$num];
        }

        return $this->cache[$num] = $this->execute($num);
    }
903104
public static function compileMode(array $perms)
    {
        $fmode = 0;
        $fmode |= !empty($perms['owner']['read'])    ? self::OWNER_READ    : 0;
        $fmode |= !empty($perms['owner']['write'])   ? self::OWNER_WRITE   : 0;
        $fmode |= !empty($perms['owner']['execute']) ? self::OWNER_EXECUTE : 0;

        $fmode |= !empty($perms['group']['read'])    ? self::GROUP_READ    : 0;
        $fmode |= !empty($perms['group']['write'])   ? self::GROUP_WRITE   : 0;
        $fmode |= !empty($perms['group']['execute']) ? self::GROUP_EXECUTE : 0;

        $fmode |= !empty($perms['world']['read'])    ? self::WORLD_READ    : 0;
        $fmode |= !empty($perms['world']['write'])   ? self::WORLD_WRITE   : 0;
        $fmode |= !empty($perms['world']['execute']) ? self::WORLD_EXECUTE : 0;

        return $fmode;
    }
133453
public function keys()
    {
        $keyPath = $this->getKeyPath();

        // find all the cached filenames among partitioned dirs within this group key
        // (e.g. '[GROUP PARTITION]/[GROUP]/[PARTITION]/[KEY]/cache')
        $iterator  = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($keyPath));

        $regIterator = new \RegexIterator($iterator, '/\/[\d]+\/[\w\d]+\/' . self::FILENAME_CACHE .'$/i');
        $keys = array();

        foreach ($regIterator as $path) {
            // extract key from file path
            preg_match('/\/(?<key>[\w\d]+)\/' . self::FILENAME_CACHE . '/', $path->__toString(), $match);
            if (!array_key_exists('key', $match) || empty($match['key'])) {
                continue;
            }
            // decode the key
            $entry = base64_decode($match['key']);
            $keys[] = $entry;
        }
        asort($keys);

        return $keys;
    }
486634
protected function _get_key($remove = false)
	{
		// get the current index information
		list($identifier, $sections, $index) = $this->_get_index();
		$index = $index === null ? array() : $index = $this->_unserialize($index);

		// get the key from the index
		$key = isset($index[$identifier][0]) ? $index[$identifier][0] : false;

		if ($remove === true)
		{
			if ( $key !== false )
			{
				unset($index[$identifier]);
				static::$redis->set($this->config['cache_id'].':index:'.$sections, $this->_serialize($index));
			}
		}
		else
		{
			// create a new key if needed
			$key === false and $key = $this->_new_key();
		}

		return $key;
	}
12785
protected function getCacheKey($template)
    {
        $name = $template->getLogicalName();

        if ($this->activeTheme) {
            $name .= '|module_theme='.$this->getLocator()->getModuleTheme().'|active_theme'.$this->activeTheme->getName();
        }

        return $name;
    }
547053
public function getCacheKey()
    {
        if (is_null($this->cacheKey)) {
            return $this->prefix.$this->suiteId;
        }

        return $this->cacheKey;
    }
652491
public function getKey($offset = null)
    {
        if (null === $offset) {
            $offset = $this->offset;
        }

        if ((null !== ($op = $this->getId(--$offset)))
            && ((DocLexer::T_COLON === $op)
                || (DocLexer::T_EQUALS === $op))) {
            return $this->getValue(--$offset);
        }

        return null;
    }
1310205
public function getCacheKey()
    {
        return $this->cacheKey ?: md5($this->db->getDbname() . $this->getSql() . serialize($this->params) . serialize($this->paramTypes));
    }
1041417
public function can($perm, $member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        if (is_array($perm)) {
            $perm = array_map(array($this, 'can'), $perm, array_fill(0, count($perm), $member));
            return min($perm);
        }
        if ($this->hasMethod($methodName = 'can' . $perm)) {
            return $this->$methodName($member);
        } else {
            return true;
        }
    }
1174965
protected function getCacheKey()
    {
        $item = UserPreference::forUser();
        $userId = $item->userContext ? $item->userContext->id : 0;
        return $this->recordCode.'-userpreference-'.$userId;
    }
307495
public function get($key)
    {
        $this->checkForKey($key);

        return $this->cache->get($this->path.$key);
    }
1276132
public function getKey()
    {
        if (!isset($this->key)) {
            $this->key = md5(microtime().rand());
        }
        return $this->key;
    }
909950
public function getPrivateKey()
    {
        if (!is_null($this->privateKey)) {
            return $this->privateKey;
        }

        return $this->privateKey = file_get_contents($this->getPrivateKeyFilePath());
    }
364420
private function getCacheKey(Request $request)
    {
        if (isset($this->keyCache[$request])) {
            return $this->keyCache[$request];
        }

        return $this->keyCache[$request] = $this->generateCacheKey($request);
    }
513264
public function key($key)
    {
        if (!$key) {
            return false;
        }

        $prefix = '';
        if ($this->_groupPrefix) {
            $prefix = md5(implode('_', $this->groups()));
        }

        $key = preg_replace('/[\s]+/', '_', strtolower(trim(str_replace([DIRECTORY_SEPARATOR, '/', '.'], '_', (string)$key))));

        return $prefix . $key;
    }