Auth0\SDK\Helpers\Cache\FileSystemCacheHandler::delete PHP Method

delete() public method

public delete ( $key )
    public function delete($key)
    {
        $key = md5($key);
        $this->set($key, null);
        @unlink($this->tmp_dir . $key);
    }

Usage Example

コード例 #1
0
ファイル: CacheTest.php プロジェクト: auth0/auth0-php
 public function testFileSystemCache()
 {
     $cache = new FileSystemCacheHandler();
     $this->assertNull($cache->get('pepe'));
     $cache->set('pepe', 'lala');
     $this->assertEquals('lala', $cache->get('pepe'));
     $cache->delete('pepe');
     $this->assertNull($cache->get('pepe'));
 }