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();
    }