ente/lib/core/cache/image_cache.dart

16 lines
301 B
Dart
Raw Normal View History

2020-08-13 01:34:16 +00:00
import 'dart:io' as io;
2020-04-24 20:59:11 +00:00
2020-05-04 20:44:34 +00:00
import 'package:photos/core/cache/lru_map.dart';
2020-04-24 20:59:11 +00:00
2020-06-15 04:50:26 +00:00
class FileLruCache {
2021-07-22 18:41:58 +00:00
static final LRUMap<String, io.File> _map = LRUMap(25);
2020-04-24 20:59:11 +00:00
static io.File? get(String key) {
2021-08-04 10:11:38 +00:00
return _map.get(key);
2020-04-24 20:59:11 +00:00
}
static void put(String key, io.File value) {
_map.put(key, value);
2020-04-24 20:59:11 +00:00
}
}