diff --git a/content/collections/tags/cache.md b/content/collections/tags/cache.md index 3d0f18b6b..d783a39ed 100644 --- a/content/collections/tags/cache.md +++ b/content/collections/tags/cache.md @@ -12,10 +12,6 @@ parameters: name: key type: string description: 'The cache key to be used, if you''d like to manually invalidate this tag pair programmatically.' - - - name: tags - type: string|array - description: 'The [cache tags](https://laravel.com/docs/9.x/cache#cache-tags) this section will be using, if you''d like to invalidate this pair programmatically. If you use this, do not also use `key`.' - name: scope type: 'string' @@ -166,37 +162,6 @@ class EventServiceProvider Invalidating by `key` won't work if you're using tags. In that case, you should invalidate by flushing the tag. ::: -### Tag - -By specifying `tags`, you can invalidate it programmatically. You must be using a cache driver that supports [tags](https://laravel.com/docs/8.x/cache#cache-tags), like Redis or Memcached. - -::tabs - -::tab antlers -```antlers -{{ cache tags="stocks|home" }} ... {{ /cache }} -{{ cache tags="home" }} ... {{ /cache }} -{{ cache tags="stocks" }} ... {{ /cache }} -``` -::tab blade -```blade - ... - ... - ... -``` -:: - -Similar to invalidating by a key as explained above, you can flush all keys that use the tags. - -```php -Cache::tags('home')->flush(); // invalidates first and second pair -Cache::tags('stocks')->flush(); // invalidates first and third pair -``` - -:::warning -Don't use the `key` and `tags` parameters together. -::: - ### Cache clear The contents of your cache tags are stored in the application cache. Clear that, and you'll see fresh content next visit.