Pinq\Caching\CSVFileCache::clearInNamespace PHP Метод

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

public clearInNamespace ( $namespace )
    public function clearInNamespace($namespace)
    {
        $fileData = $this->getFileData();
        $keysToUnset = [];
        foreach ($fileData as $key => $value) {
            if (strpos($key, $namespace) === 0) {
                $keysToUnset[] = $key;
            }
        }
        foreach ($keysToUnset as $key) {
            unset($fileData[$key]);
        }
        $this->flushFileData();
    }