My dashboard still loading after implementing correct code of cache:remember(). Even laravel logger not showing exact testing result and displaying 0 quires in it!
Thank you for your help!
How to test Cache::remember() without logger?
My dashboard still loading after implementing correct code of cache:remember(). Even laravel logger not showing exact testing result and displaying 0 quires in it!
Thank you for your help!
Show your implementation
public static function getSearchTermsWithZeroResultsHome() {
$search_term_zero_results_home = Cache::remember('search_term_zero_results_home', now()->addMinutes(60), function() {
...... .. });
return $search_term_zero_results_home;
@harishp do you return inside the Closure?
Yes, I do 'return TrackingSearchCriteria::where('results_count', 0) .... ); return $search_term_zero_results_home;
@harishp what is the problem exactly; your cached result is wrong?
@tykus, is there any way other than Laravel logger to check loading timing changing after cache implementation or by clearing cache and load again site?
@harishp okay, it wasn't clear from the OP that you just wanted to see the change in execution time
Where do you want to see the result of the execution time?
@tykus Well, that's my question, is there any way to see the result of cache implementation? Well I am using react js to render the tasks and still it's showing me loading icons (even in milliseconds) after setting up cache:remember() for them! So, I am confuse that, is it react js loading function behavior and cache is working fine or it should not happen like that once cache setup work properly?
Or can we debug the load timing of that particular page in log files to see the changes of cache implementation?
@harishp anywhere at all that works for you, or https://github.com/beyondcode/laravel-server-timing
@tykus , Thank you very much for the help mate!
Please or to participate in this conversation.