is somehow possible to cache count result for pagination query?
select count(*) as aggregate from table_name
I have table with 2 000 000+ and it tooks ~300ms every time to calculate this count. Cache this result for 1 hour would be sufficient solution, thank you!
I needed to extend
Illuminate\Database\Eloquent\ModelandIlluminate\Database\Eloquent\Builder.My extended Builder class
My extended Model class
And now i just need to extend any of my models with this new CachedModel class to apply caching of total count results.