语言

HttpEngine.Builder.SetEnableHttpCache(HttpCacheType, Int64) 方法

定义

启用或禁用 HTTP 数据的缓存和其他信息,例如 QUIC 服务器信息。

[Android.Runtime.Register("setEnableHttpCache", "(IJ)Landroid/net/http/HttpEngine$Builder;", "GetSetEnableHttpCache_IJHandler", ApiSince=34)]
public virtual Android.Net.Http.HttpEngine.Builder SetEnableHttpCache(Android.Net.Http.HttpCacheType cacheMode, long maxSize);
[<Android.Runtime.Register("setEnableHttpCache", "(IJ)Landroid/net/http/HttpEngine$Builder;", "GetSetEnableHttpCache_IJHandler", ApiSince=34)>]
abstract member SetEnableHttpCache : Android.Net.Http.HttpCacheType * int64 -> Android.Net.Http.HttpEngine.Builder
override this.SetEnableHttpCache : Android.Net.Http.HttpCacheType * int64 -> Android.Net.Http.HttpEngine.Builder

参数

cacheMode
HttpCacheType

控制缓存数据的位置和类型。 必须是HTTP_CACHE_*之一。

maxSize
Int64

用于缓存数据的最大大小(建议,有时可能超过)。

返回

用于促进链接的生成器。 此值不能为 null。

特性

注解

启用或禁用 HTTP 数据的缓存和其他信息,例如 QUIC 服务器信息。

Android 参考。android.net.http.HttpEngine.Builder.setEnableHttpCache

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于