本文整理汇总了PHP中Illuminate\Cache\CacheManager::forget方法的典型用法代码示例。如果您正苦于以下问题:PHP CacheManager::forget方法的具体用法?PHP CacheManager::forget怎么用?PHP CacheManager::forget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Cache\CacheManager
的用法示例。
在下文中一共展示了CacheManager::forget方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set
/**
* @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: removeCacheLocale
/**
* 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: forget
/**
* Forget a key in the cache.
*
* @param string $key
*
* @return void
*/
protected function forget($key)
{
$this->cache->forget($this->key($key));
}
示例4: destroy
/**
* @param $key
*/
public function destroy($key)
{
$this->cache->forget($key);
}
示例5: delete
/**
* 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: forgetCollectionCache
/**
* Forget the collection cache.
*
* @return \JasonLewis\Website\DocumentCollection
*/
public function forgetCollectionCache()
{
$this->cache->forget($this->identifier);
return $this;
}
示例7: forgetCache
/**
* Clears the extensions cache.
*
* @return void
*/
protected function forgetCache()
{
if ($this->cache) {
$this->cache->forget(static::$cacheKey);
}
}
示例8: forget
/**
* Remove an item from the cache.
*
* @param string $key
*
* @return bool
*/
public function forget($key)
{
return $this->cache->forget($this->prefix . $key);
}
示例9: deleteCachedMenu
/**
* 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: forget
public function forget($key)
{
return $this->cache->forget($this->makeKey($key));
}
示例11: removeCache
/**
* Removes the repository cache for the given item
* enforcing a database reload.
*
* @return void
*/
protected function removeCache()
{
$this->cache->forget('cartalyst.config');
}