Example #1
0
 /**
  * Cache data again
  * @property $key - optional
  * @return void
  */
 public static function cache($key = false)
 {
     if (!self::$_cache) {
         return;
     }
     if ($key === false) {
         foreach (self::$_store as $k => $v) {
             self::$_cache->save($v, $k);
         }
     } else {
         if (self::$_store->keyExists($key)) {
             self::$_cache->save(self::$_store->get($key), $key);
         }
     }
 }
Example #2
0
 /**
  * Invalidate (remove) token
  * @param string $token
  */
 public function removeToken($token)
 {
     self::$_storage->remove($token);
 }