setQueryData<T> method
Functionally update cached data for a query.
updater receives the previous data and returns new data.
Automatically sets the timestamp to now.
Implementation
void setQueryData<T>(Object queryKey, T Function(T? oldData) updater) {
final normalizedKey = QueryKey.normalize(queryKey);
final oldData = getCachedData<T>(normalizedKey);
final newData = updater(oldData);
updateCache(normalizedKey, newData, DateTime.now());
}