Share via


StorageManager.GetCacheSizeBytes(UUID) Method

Definition

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

[Android.Runtime.Register("getCacheSizeBytes", "(Ljava/util/UUID;)J", "GetGetCacheSizeBytes_Ljava_util_UUID_Handler", ApiSince=26)]
public virtual long GetCacheSizeBytes (Java.Util.UUID storageUuid);
[<Android.Runtime.Register("getCacheSizeBytes", "(Ljava/util/UUID;)J", "GetGetCacheSizeBytes_Ljava_util_UUID_Handler", ApiSince=26)>]
abstract member GetCacheSizeBytes : Java.Util.UUID -> int64
override this.GetCacheSizeBytes : 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 total size in bytes of all cached data belonging to the calling app on the given storage volume.

Cached data tracked by this method always includes Context#getCacheDir() and Context#getCodeCacheDir(), and it also includes Context#getExternalCacheDir() if the primary shared/external storage is hosted on the same storage device as your private data. <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.getCacheSizeBytes(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