Metric cache needs to be implemented by ourselves? Docs should be clearer if that's the case #4633
-
https://nova.laravel.com/docs/3.0/metrics/defining-metrics.html#caching I've enabled a 1-hour cache for all my value metrics and I was scratching my head how come the caching doesn't seem to be doing anything. It appears that while the cache is indeed set, once it's been set it isn't actually loaded anywhere. Are we supposed to implement the load-from-cache ourselves inside our This feels counter-intuitive. Inside the Currently it appears that this is not how it works, and we should use the Is this really intended to work this way? Or maybe I'm totally missing something. Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As a sanity check, I created a cached metric inside a new Nova application. It appears caching is working without manually handling the caching internals yourself by just returning a If you can demonstrate with a reproducible example where metric caching isn't working, we'd love to look at it. |
Beta Was this translation helpful? Give feedback.
As a sanity check, I created a cached metric inside a new Nova application. It appears caching is working without manually handling the caching internals yourself by just returning a
Carbon
instance inside thecacheFor
method.If you can demonstrate with a reproducible example where metric caching isn't working, we'd love to look at it.