Compartilhar via


StorageManager.GetCacheQuotaBytes(UUID) Method

Definition

Return quota size in bytes for all cached data belonging to the calling app on the given storage volume.

[Android.Runtime.Register("getCacheQuotaBytes", "(Ljava/util/UUID;)J", "GetGetCacheQuotaBytes_Ljava_util_UUID_Handler", ApiSince=26)]
public virtual long GetCacheQuotaBytes (Java.Util.UUID storageUuid);
[<Android.Runtime.Register("getCacheQuotaBytes", "(Ljava/util/UUID;)J", "GetGetCacheQuotaBytes_Ljava_util_UUID_Handler", ApiSince=26)>]
abstract member GetCacheQuotaBytes : Java.Util.UUID -> int64
override this.GetCacheQuotaBytes : Java.Util.UUID -> int64

Parameters

storageUuid
UUID

the UUID of the storage volume that you're interested in. The UUID for a specific path can be obtained using #getUuidForPath(File).

Returns

Attributes

Remarks

Return quota size in bytes for all cached data belonging to the calling app on the given storage volume.

If your app goes above this quota, your cached files will be some of the first to be deleted when additional disk space is needed. Conversely, if your app stays under this quota, your cached files will be some of the last to be deleted when additional disk space is needed.

This quota will change over time depending on how frequently the user interacts with your app, and depending on how much system-wide disk space is used. <p class="note"> Note: if your app uses the android:sharedUserId manifest feature, then cached data for all packages in your shared UID is tracked together as a single unit.

Java documentation for android.os.storage.StorageManager.getCacheQuotaBytes(java.util.UUID).

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