예제 #1
0
 /**
  * Make logout from XMLNuke Engine
  * @access public
  * @param string $key
  */
 public function registerLogout($key = 'default')
 {
     $this->session->release("user.{$key}");
     $this->session->release("user.{$key}.data");
     if ($this->session instanceof SessionCacheEngine) {
         session_unset();
     }
 }
예제 #2
0
 /**
  * @param CacheItemInterface $item
  * @return bool|void
  */
 public function save(CacheItemInterface $item)
 {
     if (!$item instanceof CacheItem) {
         throw new InvalidArgumentException('The cache item must be an implementation of \\ByJG\\Cache\\Psr\\CacheItem');
     }
     if ($item->getExpiresInSecs() < 1) {
         throw new InvalidArgumentException('Object has expired!');
     }
     $this->_cacheEngine->set($item->getKey(), $item->get(), $item->getExpiresInSecs());
     $this->addElementToBuffer($item);
     return true;
 }