mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
set defaults
This commit is contained in:
parent
8d272f8abc
commit
831fb5a2f9
2 changed files with 7 additions and 7 deletions
|
|
@ -2,7 +2,7 @@ part of 'image_request.dart';
|
|||
|
||||
class RemoteImageRequest extends ImageRequest {
|
||||
static final _client = const NetworkRepository().getHttpClient(
|
||||
directoryName: 'thumbnails',
|
||||
'thumbnails',
|
||||
diskCapacity: kThumbnailDiskCacheSize,
|
||||
memoryCapacity: 0,
|
||||
maxConnections: 16,
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@ class NetworkRepository {
|
|||
|
||||
const NetworkRepository();
|
||||
|
||||
http.Client getHttpClient({
|
||||
required String directoryName,
|
||||
required int diskCapacity,
|
||||
required int memoryCapacity,
|
||||
required int maxConnections,
|
||||
required CacheMode cacheMode,
|
||||
http.Client getHttpClient(
|
||||
String directoryName, {
|
||||
int diskCapacity = 100 << 20,
|
||||
int memoryCapacity = 10 << 20,
|
||||
int maxConnections = 6,
|
||||
CacheMode cacheMode = CacheMode.disk,
|
||||
}) {
|
||||
final cachedClient = _clients[directoryName];
|
||||
if (cachedClient != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue