🛑Cache Invalidation
In the previous example with the bookshelves, you might as well invalidate tags.
Flushing is done by calling flushQueryCache
with the respective tags.
You can as well invalidate more tags at once if needed:
Tags vs SQL Hash Key
Please be careful that the same tags do not mean the same cached key. In the following example, we might have a users
table and retrieve them by their name.
Even when specifying the same tag, the caching will be done according to the SQL query (which is different), but we can invalidate both caches if needed later:
Last updated