/** * @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; }
/** * 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); } }
/** * Forget a key in the cache. * * @param string $key * * @return void */ protected function forget($key) { $this->cache->forget($this->key($key)); }
/** * @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)); }
/** * Forget the collection cache. * * @return \JasonLewis\Website\DocumentCollection */ public function forgetCollectionCache() { $this->cache->forget($this->identifier); return $this; }
/** * Clears the extensions cache. * * @return void */ protected function forgetCache() { if ($this->cache) { $this->cache->forget(static::$cacheKey); } }
/** * 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); }
public function forget($key) { return $this->cache->forget($this->makeKey($key)); }
/** * Removes the repository cache for the given item * enforcing a database reload. * * @return void */ protected function removeCache() { $this->cache->forget('cartalyst.config'); }