Replies: 1 comment 1 reply
-
You should take a look at. https://leqc.renoki.org/cache-tags/query-caching |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice if you could do something like this:
$count = User::cache(now()->addHour())->count();
This is a simple query but you can imagine a more complicated query you would want to cache. The cache key could the SQL query plus the bindings.
That is a lot cleaner than writing this:
Beta Was this translation helpful? Give feedback.
All reactions