Share via


HttpResponseCache.Install(File, Int64) Method

Definition

Creates a new HTTP response cache and sets it as the system default cache.

[Android.Runtime.Register("install", "(Ljava/io/File;J)Landroid/net/http/HttpResponseCache;", "")]
public static Android.Net.Http.HttpResponseCache? Install (Java.IO.File? directory, long maxSize);
[<Android.Runtime.Register("install", "(Ljava/io/File;J)Landroid/net/http/HttpResponseCache;", "")>]
static member Install : Java.IO.File * int64 -> Android.Net.Http.HttpResponseCache

Parameters

directory
File

the directory to hold cache data.

maxSize
Int64

the maximum size of the cache in bytes.

Returns

the newly-installed cache

Attributes

Exceptions

if directory cannot be used for this cache. Most applications should respond to this exception by logging a warning.

Remarks

Creates a new HTTP response cache and sets it as the system default cache.

Java documentation for android.net.http.HttpResponseCache.install(java.io.File, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to