Files
ente/lib/core/cache/image_cache.dart
Vishnu Mohandas 90a2a44aec Fix cach keys
2020-06-06 17:37:24 +05:30

17 lines
353 B
Dart

import 'dart:io';
import 'package:photos/core/cache/lru_map.dart';
import 'package:photos/models/photo.dart';
class ImageLruCache {
static LRUMap<int, File> _map = LRUMap(500);
static File get(Photo photo) {
return _map.get(photo.hashCode);
}
static void put(Photo photo, File imageData) {
_map.put(photo.hashCode, imageData);
}
}