mirror of
https://github.com/immich-app/immich.git
synced 2024-12-19 00:32:49 +02:00
c1253663b7
* refactor(mobile): services and provider * providers
22 lines
606 B
Dart
22 lines
606 B
Dart
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
|
|
|
/// The cache manager for thumbnail images [ImmichRemoteThumbnailProvider]
|
|
class ThumbnailImageCacheManager extends CacheManager {
|
|
static const key = 'thumbnailImageCacheKey';
|
|
static final ThumbnailImageCacheManager _instance =
|
|
ThumbnailImageCacheManager._();
|
|
|
|
factory ThumbnailImageCacheManager() {
|
|
return _instance;
|
|
}
|
|
|
|
ThumbnailImageCacheManager._()
|
|
: super(
|
|
Config(
|
|
key,
|
|
maxNrOfCacheObjects: 5000,
|
|
stalePeriod: const Duration(days: 30),
|
|
),
|
|
);
|
|
}
|