コード例 #1
0
ファイル: Factory.php プロジェクト: darrengopower/framework
 /**
  * @param $key
  * @param $value
  * @return bool
  */
 public function set($key, $value)
 {
     $setting = Setting::whereKey($key)->first();
     if (!is_object($setting)) {
         $setting = new Setting();
         $setting->key = $key;
     }
     $setting->value = $value;
     $setting->save();
     if ($this->application->isInstalled()) {
         $this->cache->forget($this->cache_key);
     }
     return true;
 }
コード例 #2
0
 /**
  * Remove a locale from the cache.
  *
  * @param string $code
  */
 protected function removeCacheLocale($code)
 {
     $id = sprintf('translation.%s', $code);
     if ($this->cache->has($id)) {
         $this->cache->forget($id);
     }
 }
コード例 #3
0
ファイル: Handler.php プロジェクト: joselfonseca/api
 /**
  * Forget a key in the cache.
  *
  * @param string $key
  *
  * @return void
  */
 protected function forget($key)
 {
     $this->cache->forget($this->key($key));
 }
コード例 #4
0
ファイル: CacheClass.php プロジェクト: weboap/visitor
 /**
  * @param $key
  */
 public function destroy($key)
 {
     $this->cache->forget($key);
 }
コード例 #5
0
 /**
  * Deletes a setting.
  *
  * @param  string $key
  * @return void
  */
 public function delete($key)
 {
     // erase the local cache
     unset($this->settings[$key]);
     $this->cache->forget($this->key($key));
 }
コード例 #6
0
ファイル: Collection.php プロジェクト: bamper/website
 /**
  * Forget the collection cache.
  * 
  * @return \JasonLewis\Website\DocumentCollection
  */
 public function forgetCollectionCache()
 {
     $this->cache->forget($this->identifier);
     return $this;
 }
コード例 #7
0
ファイル: Extension.php プロジェクト: sohailaammarocs/lfc
 /**
  * Clears the extensions cache.
  *
  * @return void
  */
 protected function forgetCache()
 {
     if ($this->cache) {
         $this->cache->forget(static::$cacheKey);
     }
 }
コード例 #8
0
 /**
  * Remove an item from the cache.
  *
  * @param string $key
  * 
  * @return bool
  */
 public function forget($key)
 {
     return $this->cache->forget($this->prefix . $key);
 }
コード例 #9
0
 /**
  * deleteCachedMenu
  *
  * @param string $menuId key of cache
  *
  * @return void
  */
 public function deleteCachedMenu($menuId)
 {
     $keyString = $this->getMenuCacheKeyString($menuId);
     $this->cache->forget($keyString);
     $itemKeyString = $this->getMenuItemCacheKeyString($menuId);
     $this->cache->forget($itemKeyString);
     $this->forgetMenuMapByKey($menuId);
 }
コード例 #10
0
ファイル: CacheManager.php プロジェクト: vinelab/agency
 public function forget($key)
 {
     return $this->cache->forget($this->makeKey($key));
 }
コード例 #11
0
ファイル: Repository.php プロジェクト: sohailaammarocs/lfc
 /**
  * Removes the repository cache for the given item
  * enforcing a database reload.
  *
  * @return void
  */
 protected function removeCache()
 {
     $this->cache->forget('cartalyst.config');
 }