Function setCacheSecurityKey

@author: 713uk13m <dev@nguyenanhung.com>
@time  : 10/12/18 18:56

@param $cacheSecurityKey
323295
public function setCacheSecurityKey($cacheSecurityKey)
    {
        $this->cacheSecurityKey = $cacheSecurityKey;
        $this->debug->debug(__FUNCTION__, 'setCacheSecurityKey: ', $this->cacheSecurityKey);
    }
582138
public function cacheFile($cacheKey, $fileContents) {

        // Get directory and filename
        list($directory, $filename) = $this->getDirectoryAndFilenameFromKey($cacheKey);

        // Make the cache directory
        if (!file_exists($directory)) mkdir($directory, 0777, true);

        // Save the file
        file_put_contents($directory . "/" . $filename, $fileContents);

    }
621161
public function clear($commandKey, $cacheKey)
    {
        if ($this->exists($commandKey, $cacheKey)) {
            unset($this->cachedResults[$commandKey][$cacheKey]);
        }
    }
498103
public function setCacheByKey($cacheKey, $confCache, $results, $getForce = false)
	{
	    if ($this->getRenderMode() != 'front' && !$getForce)
	        return;

	    $active = $this->isCacheConfActive($confCache);
	    if ($active)
	    {
	        $cache = $this->getServiceLocator()->get($confCache);
	        $cache->setItem($cacheKey, $results);
	        unset($cache);
	    }
	}
796366
function check(CacheKey $key) {

		if (isset ( $this->elements [$key->getModule()] [$key->getProperty()] )) {
			return true;
		} else {
			return false;
		}
	}
250827
public function setChiperKey($chiperKey)
    {
        if (!$chiperKey) {
            return;
        }
        $this->chiper->setKey($chiperKey);
        $this->chiperKey = $chiperKey;
    }
678501
public static function validateKey($key): void
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException(sprintf(
                'Cache key must be string, "%s" given',
                is_object($key) ? get_class($key) : gettype($key)
            ));
        }
        if (!isset($key[0])) {
            throw new InvalidArgumentException('Cache key length must be greater than zero');
        }
        if (isset($key[strcspn($key, '{}()/\@:')])) {
            throw new InvalidArgumentException(sprintf('Cache key "%s" contains reserved characters {}()/\@:', $key));
        }
    }
824817
private function maintenance(CacheKey $key) {

		$module = $key->getModule();
		
		if (! isset ( $_SESSION [$this->cacheName] [$module] )) {
			return false;
		}
			
		if (time () < $_SESSION [$this->cacheMaintenanceTimeName] [$module]) {
			return false;
		}
			
		$_SESSION [$this->cacheMaintenanceTimeName] [$module] = time () + $this->timeThreshold;

		$keys = array_keys ( $_SESSION [$this->cacheName] [$module] );

		foreach ( $keys as $value ) {
			if (time() > $_SESSION [$this->cacheName] [$module] [$value] ['time']) {
				unset ( $_SESSION [$this->cacheName] [$module] [$value] );
			}
		}

		return true;
	}
1015748
private function _generateEncryptedContentKey($aesKey, $protectionKey)
    {
        $cert = openssl_x509_read($protectionKey);

        $cryptedContentKey = '';
        openssl_public_encrypt(
            $aesKey,
            $cryptedContentKey,
            $cert,
            OPENSSL_PKCS1_OAEP_PADDING
        );

        $this->_encryptedContentKey = base64_encode($cryptedContentKey);
    }
938627
private function clearCache($key)
    {
        $allowedCacheKeys = [
            self::CACHE_KEY_CSS,
            self::CACHE_KEY_SELECTOR,
            self::CACHE_KEY_XPATH,
            self::CACHE_KEY_CSS_DECLARATIONS_BLOCK,
            self::CACHE_KEY_COMBINED_STYLES,
        ];
        if (!in_array($key, $allowedCacheKeys, true)) {
            throw new \InvalidArgumentException('Invalid cache key: ' . $key, 1391822035);
        }

        $this->caches[$key] = [];
    }
789468
public function setKey()
    {
        $path = $this->path . "/.cache_key";
        $key = bin2hex(openssl_random_pseudo_bytes(6));
        $umask = umask($this->umask);
        file_put_contents($path, $key);
        umask($umask);
        return $key;
    }
1095512
public void setCacheSecurityGroups(java.util.Collection<CacheSecurityGroup> cacheSecurityGroups) {
        if (cacheSecurityGroups == null) {
            this.cacheSecurityGroups = null;
            return;
        }

        this.cacheSecurityGroups = new com.amazonaws.internal.SdkInternalList<CacheSecurityGroup>(cacheSecurityGroups);
    }
866282
protected function resetRun(array $cacheKeys)
    {
        parent::__construct(array_merge([
            'select'        => [],
            'union'         => [],
            'unionAll'      => [],
            'into'          => false,
            'distinct'      => false,
            'from'          => [],
            'join'          => [],
            'where'         => [],
            'having'        => [],
            'between'       => [],
            'notBetween'    => [],
            'limit'         => false,
            'offset'        => false,
            'groupBy'       => [],
            'orderBy'       => [],
            'keys'          => [],
            'sets'          => [],
            'binds'         => [],
            'aliasedTables' => [],
            'noEscape'      => [],
            'bracketOpen'   => false,
            'bracketCount'  => 0,
            'statement'     => null,
        ], $cacheKeys), \ArrayObject::ARRAY_AS_PROPS);
    }
272977
function set($key, $data)
    {
        $this->cache[$key]         = $data;
        $this->cache_changes[$key] = true;
    }
4514
public function deleteFromCache($key)
  {
    $file = $this->cachePath . $this->getEncodedKey($key);
    if (file_exists($file)) {
      unlink($file);
    }
  }
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
        }
    }
307389
public function setAuthKey($key)
    {
        $authKeyAttribute = $this->authKeyAttribute;
        return (is_string($authKeyAttribute) && !empty($authKeyAttribute)) ? $this->$authKeyAttribute = $key : null;
    }