4 namespace Friendica\Test\src\Core\Cache;
7 use Friendica\Core\Cache\CacheDriverFactory;
9 class MemcacheCacheDriverTest extends MemoryCacheTest
12 * @var \Friendica\Core\Cache\IMemoryCacheDriver
16 protected function getInstance()
18 if (class_exists('Memcache')) {
20 $this->cache = CacheDriverFactory::create('memcache');
21 } catch (\Exception $exception) {
22 throw new \Exception("Memcache - TestCase failed: " . $exception->getMessage(), $exception->getCode(), $exception);
26 $this->markTestSkipped('Memcache driver isn\'t available');
31 public function tearDown()
33 if (class_exists('Memcache')) {
34 $this->cache->clear(false);