I just used a cache service explicitely for the first time, in a function that calls a remote service. The result is a simple string that may change day by day, but it's very rare that it changes for the past – so I expire it at midnight.
I injected cache.default
in my controller – then I saw that in core services there is also a service called cache.data
. What's the difference? Is there any reason to prefer one to the other?