disable disk cache by default
This commit is contained in:
@@ -28,12 +28,14 @@ class NetworkRepository {
|
|||||||
|
|
||||||
const NetworkRepository();
|
const NetworkRepository();
|
||||||
|
|
||||||
|
/// Note: when disk caching is enabled, only one client may use a given directory at a time.
|
||||||
|
/// Different isolates or engines must use different directories.
|
||||||
http.Client getHttpClient(
|
http.Client getHttpClient(
|
||||||
String directoryName, {
|
String directoryName, {
|
||||||
int diskCapacity = 100 << 20,
|
CacheMode cacheMode = CacheMode.memory,
|
||||||
int memoryCapacity = 10 << 20,
|
int diskCapacity = 0,
|
||||||
int maxConnections = 6,
|
int maxConnections = 6,
|
||||||
CacheMode cacheMode = CacheMode.disk,
|
int memoryCapacity = 10 << 20,
|
||||||
}) {
|
}) {
|
||||||
final cachedClient = _clients[directoryName];
|
final cachedClient = _clients[directoryName];
|
||||||
if (cachedClient != null) {
|
if (cachedClient != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user