cacheMetaData method

void cacheMetaData({
  1. required BaseChannel channel,
  2. int? ts,
})

Implementation

void cacheMetaData({required BaseChannel channel, int? ts}) {
  if (this['metadata'] != null) {
    final data = Map<String, String>.from(this['metadata']);
    final metaData = CachedDataMap<String>(
      channelType: channel.channelType,
      channelUrl: channel.channelUrl,
      data: data,
      timestamp: ts ?? DateTime.now().millisecondsSinceEpoch,
    );
    metaData.saveToCache();
  }
}