/** * {@inheritdoc} */ protected function clearOneObjectFromCache($key) { if (null === $this->store->get($key)) { return true; } return $this->store->forget($key); }
/** * Clear the cache for the given user. * * @param \Illuminate\Database\Eloquent\Model|int $user * @return $this */ public function refreshFor($user) { $id = $user instanceof Model ? $user->getKey() : $user; $this->cache->forget($this->tag . '-permissions-' . $id); $this->cache->forget($this->tag . '-roles-' . $id); return $this; }
/** * Clear the cache for the given authority. * * @param \Illuminate\Database\Eloquent\Model $authority * @return $this */ public function refreshFor(Model $authority) { $this->cache->forget($this->getCacheKey($authority, 'abilities', true)); $this->cache->forget($this->getCacheKey($authority, 'abilities', false)); $this->cache->forget($this->getCacheKey($authority, 'roles')); return $this; }
/** * Clear the cache for the given user. * * @param \Illuminate\Database\Eloquent\Model $user * @return $this */ public function refreshFor(Model $user) { $id = $user->getKey(); $this->cache->forget($this->tag . '-abilities-' . $id); $this->cache->forget($this->tag . '-roles-' . $id); return $this; }
/** * {@inheritdoc} */ public function delete($key) { if ($this->cache->forget($key) === false) { return false; } }
/** * Remove an item from the cache. * * @param string $key * @return bool */ public function forget($key) { return $this->store->forget($this->taggedItemKey($key)); }
/** * Remove an item from the cache. * * @param string $key * @return bool */ public function forget($key) { $success = $this->store->forget($key); $this->fireCacheEvent('delete', [$key]); return $success; }
/** * Remove an item from the cache. * * @param string $key * * @return bool */ public function forget($key) { return $this->store->forget($key); }
/** * Clear the login locks for the given user credentials. * @param Request $request * @return void */ protected function clearLoginAttempts(Request $request, Cache $cache) { $cache->forget($this->loginAttemptsKey($request)); $cache->forget($this->loginLockExpirationKey($request)); }