Example #1
0
 /**
  * @param Configuration $config
  * @throws MemcacheNotFoundException
  */
 public function __construct(Configuration $config)
 {
     if (!class_exists('Memcache')) {
         throw new MemcacheNotFoundException();
     }
     $memcache = new MemcacheBase();
     // save into object manager
     $objectManager = Safan::handler()->getObjectManager();
     $objectManager->setObject('memcache', $memcache);
     // set hash
     $this->hashKey = $config->getHashKey();
 }