addWithKey method
Implementation
void addWithKey(String key, T value, int ts) {
if (value == null) return;
final existData = _cachedDataMap[key];
if (existData == null) {
final newData = CachedData<T>(value: value, ts: ts);
_cachedDataMap[key] = newData;
} else if (existData.ts < ts) {
existData.value = value;
existData.ts = ts;
}
if (_cachedDataMap.length == 1) (policy as PeriodEviction).start();
}