toJson method
Serialize CacheEntry to JSON Map
Implementation
Map<String, dynamic> toJson() {
return {
'data': data,
'timestamp': timestamp.toIso8601String(),
'lastAccessTime': lastAccessTime.toIso8601String(),
'accessCount': accessCount,
'sizeInBytes': sizeInBytes,
'ttl': ttl?.inMilliseconds,
};
}