Airship\Engine\Cache\SharedMemory::delete PHP Метод

delete() публичный Метод

Delete a cache entry
public delete ( string $key ) : boolean
$key string
Результат boolean
    public function delete(string $key) : bool
    {
        $shmKey = $this->getSHMKey($key);
        if (!\apcu_exists($shmKey)) {
            return true;
        }
        // Fetch
        $fetch = \apcu_fetch($shmKey);
        $length = Util::stringLength($fetch);
        // Wipe:
        \Sodium\memzero($fetch);
        \apcu_store($shmKey, \str_repeat("", $length));
        // Delete
        return \apcu_delete($shmKey);
    }