Closed madsem closed 6 years ago
No, I believe this is a current bug, probably the similar or same as #111.
@madsem Looking at this more closely now, I believe this is because you are running the queries in the load method. Right now the load method does not get cached. I'm undecided if I want to have that be cached or not, so far I have not had a use-case for it. I would recommend for you to run all your querying outside the load method.
Closing for now ... decided not to implement caching in the load method, at least for now.
Question
Querying across multiple children, was hoping that laravel-model-caching would actually generate a dynamic cache tag based on the query conditions. But the result is that it seems to simply use model names to build the string?
In short: Can it handle queries like the above so that it actually builds multiple versions of the cache for each of the results this query can produce? (country, device type etc)
What I'd like to achieve is that the results are cached, but different versions based on domain, country, browser, device type, OS and ad type. And then the correct version is automatically delivered from cache to visitors that have the same environment variables, or hit database if not.
Hope I am explaining this good enough :)
Or am I way off here and this can only work by manually creating a cache key and disabling caching for this particular query?