get<T> static method

CacheStrategy<T>? get<T>(
  1. String key
)

获取指定缓存(带类型安全检查)

Implementation

static CacheStrategy<T>? get<T>(String key) {
  final cache = _caches[key];
  if (cache is CacheStrategy<T>) {
    return cache;
  }
  return null;
}