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 {
|
class RemoteImageRequest extends ImageRequest {
|
||||||
static final _client = const NetworkRepository().getHttpClient(
|
static final _client = const NetworkRepository().getHttpClient(
|
||||||
directoryName: 'thumbnails',
|
'thumbnails',
|
||||||
diskCapacity: kThumbnailDiskCacheSize,
|
diskCapacity: kThumbnailDiskCacheSize,
|
||||||
memoryCapacity: 0,
|
memoryCapacity: 0,
|
||||||
maxConnections: 16,
|
maxConnections: 16,
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,12 @@ class NetworkRepository {
|
||||||
|
|
||||||
const NetworkRepository();
|
const NetworkRepository();
|
||||||
|
|
||||||
http.Client getHttpClient({
|
http.Client getHttpClient(
|
||||||
required String directoryName,
|
String directoryName, {
|
||||||
required int diskCapacity,
|
int diskCapacity = 100 << 20,
|
||||||
required int memoryCapacity,
|
int memoryCapacity = 10 << 20,
|
||||||
required int maxConnections,
|
int maxConnections = 6,
|
||||||
required CacheMode cacheMode,
|
CacheMode cacheMode = CacheMode.disk,
|
||||||
}) {
|
}) {
|
||||||
final cachedClient = _clients[directoryName];
|
final cachedClient = _clients[directoryName];
|
||||||
if (cachedClient != null) {
|
if (cachedClient != null) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue