Version: 2017.3 (switch to 2017.4)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Cache

struct in UnityEngine

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Data structure for cache. Please refer to See Also:Caching.AddCache for more information.

Properties

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.

Public Methods

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

Did you find this page useful? Please give it a rating: