@JabatoForever Thanks to reply. My Problem is i have an existing api which have UserResource utilise to prepare the response payload which contains the pagination results.
and the query contains paginate method to fetch results and paginate result both.
so as you understand i want to avoid count(*) query as my query is quite complex and load is very high. ( on direct execution of query in phpmyadmin itself took some 3 seconds to fetch the result.
I want to cache the result of this query as per hourly basis.
as per my understanding the approach you have shared would contain that paginate query & normal result as well right?