Complete the code to store a cache item with a tag.
Cache::tags('[1]')->put('key', 'value', 60);
The tags method accepts the tag name as a string to group cache items.
Complete the code to retrieve a cached item with a tag.
$value = Cache::tags('users')->[1]('key');
put instead of get to retrieve data.forget which deletes the cache.The get method retrieves the cached value by key.
Fix the error in the code to clear all cache items with the 'users' tag.
Cache::tags('users')->[1]();
clear which is not a valid method.forget which only deletes one key.The flush method clears all cache items for the given tags.
Fill both blanks to store a cache item with multiple tags.
Cache::tags([[1], [2]])->put('key', 'value', 120);
Multiple tags are passed as an array of strings to the tags method.
Fill all three blanks to retrieve a cached item with multiple tags and a default value.
$value = Cache::tags([[1], [2]])->get('key', [3]);
The get method accepts a default value returned if the key is missing. Multiple tags are passed as an array.
