You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When this package is used https://github.com/spatie/laravel-responsecache to cache entire response (for speed), page views are only recorded for the first time. as the next request will provide response from the cache, the page views are not recorded. Is there any workaround this?
The text was updated successfully, but these errors were encountered:
I don't think this is possible. It looks like the response cache package caches the whole page content and doesn't run any controller code. You could try to hack around with the triggered events, but I would personally turn it off using the doNotCacheResponse route middleware for that page.
Well, using doNotCacheResponse is not an option for me as page load speed is significantly faster when caching response.
I have worked this around by adding an ajax request at page load that just runs the function addPageViews.
When this package is used https://github.com/spatie/laravel-responsecache to cache entire response (for speed), page views are only recorded for the first time. as the next request will provide response from the cache, the page views are not recorded. Is there any workaround this?
The text was updated successfully, but these errors were encountered: