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 print "Memcache - TestCase failed: " . $exception->getMessage();
23 throw new \Exception();
27 $this->markTestSkipped('Memcache driver isn\'t available');
32 public function tearDown()
34 if (class_exists('Memcache')) {
35 $this->cache->clear(false);