setObject<T extends MeteorSharedObject> method

Future<void> setObject<T extends MeteorSharedObject>(
  1. String key,
  2. T? value
)

缓存对象 T 是继承自MeteorSharedObject类的的对象

Implementation

Future<void> setObject<T extends MeteorSharedObject>(String key, T? value) async {
  await SharedMemoryCache.setMap(key, value?.toJson());
}