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

Beispiel #1
0
 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'));
 }