Converts a Model item to a JSON map for caching.
Model
Map<String, dynamic> Function(Model item)? cacheToJson;