Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Cache

Data structure for cache. For more information, see Caching.AddCache.
Read time 1 minuteLast updated 5 days ago

Definition

public struct Cache : IEquatable<Cache>

Remarks

Note: The Cache API is not supported in WebGL because AssetBundles are stored in the browser cache for the WebGL platform.

Properties

Property

Description

expirationDelayThe number of seconds that an AssetBundle may remain unused in the cache before it is automatically deleted.
indexReturns the index of the cache in the cache list.
maximumAvailableStorageSpaceAllows you to specify the total number of bytes that can be allocated for the cache.
pathReturns the path of the cache.
readOnlyReturns true if the cache is readonly.
readyReturns true if the cache is ready.
spaceFreeReturns the number of currently unused bytes in the cache.
spaceOccupiedReturns the used disk space in bytes.
validReturns true if the cache is valid.

Methods

Method

Description

ClearCacheRemoves all cached content in the cache that has been cached by the current application.