コード例 #1
0
ファイル: Command.php プロジェクト: mglaman/drupalorg-cli
 /**
  * Sets a cache value.
  *
  * @param $cid
  * @param $value
  * @param int $ttl
  * @return bool
  */
 protected function setCacheKey($cid, $value, $ttl = 3600)
 {
     return Cache::getCache()->save($cid, $value, $ttl);
 }
コード例 #2
0
ファイル: CacheClear.php プロジェクト: mglaman/drupalorg-cli
 /**
  * {@inheritdoc}
  *
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     Cache::getCache()->flushAll();
 }