Ejemplo n.º 1
0
 /**
  * @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;
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 3
0
 /**
  * Forget a key in the cache.
  *
  * @param string $key
  *
  * @return void
  */
 protected function forget($key)
 {
     $this->cache->forget($this->key($key));
 }
Ejemplo n.º 4
0
 /**
  * @param $key
  */
 public function destroy($key)
 {
     $this->cache->forget($key);
 }
 /**
  * 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));
 }
Ejemplo n.º 6
0
 /**
  * Forget the collection cache.
  * 
  * @return \JasonLewis\Website\DocumentCollection
  */
 public function forgetCollectionCache()
 {
     $this->cache->forget($this->identifier);
     return $this;
 }
Ejemplo n.º 7
0
 /**
  * Clears the extensions cache.
  *
  * @return void
  */
 protected function forgetCache()
 {
     if ($this->cache) {
         $this->cache->forget(static::$cacheKey);
     }
 }
Ejemplo n.º 8
0
 /**
  * Remove an item from the cache.
  *
  * @param string $key
  * 
  * @return bool
  */
 public function forget($key)
 {
     return $this->cache->forget($this->prefix . $key);
 }
 /**
  * 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);
 }
Ejemplo n.º 10
0
 public function forget($key)
 {
     return $this->cache->forget($this->makeKey($key));
 }
Ejemplo n.º 11
0
 /**
  * Removes the repository cache for the given item
  * enforcing a database reload.
  *
  * @return void
  */
 protected function removeCache()
 {
     $this->cache->forget('cartalyst.config');
 }