语言

StorageStats.CacheBytes 属性

定义

返回所有缓存数据的大小。

public long CacheBytes { [Android.Runtime.Register("getCacheBytes", "()J", "", ApiSince=26)] get; }
[<get: Android.Runtime.Register("getCacheBytes", "()J", "", ApiSince=26)>]
member this.CacheBytes : int64

属性值

值为非负字节数。

特性

注解

返回所有缓存数据的大小。 这包括存储在以下和Context#getCacheDir()下方Context#getCodeCacheDir()的文件。

如果主外部/共享存储托管在此存储设备上,则这包括存储在下面的 Context#getExternalCacheDir()文件。

缓存的数据是针对多用户设备上的每个用户隔离的。

Java文档android.app.usage.StorageStats.getCacheBytes()。

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

适用于