docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CacheInitializationData

    Contains settings for the Caching system.

    Inheritance
    object
    CacheInitializationData
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.AddressableAssets.Initialization
    Assembly: Unity.Addressables.dll
    Syntax
    [Serializable]
    public class CacheInitializationData

    Properties

    Name Description
    CacheDirectoryOverride

    If not null or empty a new cache is created using Caching.AddCache and it is set active by assigning it to Caching.currentCacheForWriting.

    CompressionEnabled

    Enable recompression of asset bundles into LZ4 format as they are saved to the cache. This sets the Caching.compressionEnabled value.

    ExpirationDelay

    Controls how long bundles are kept in the cache. This value is applied to Caching.currentCacheForWriting.expirationDelay. The value is in seconds and has a limit of 12960000 (150 days).

    LimitCacheSize

    If true, the maximum cache size will be set to MaximumCacheSize.

    MaximumCacheSize

    The maximum size of the cache in bytes. This value is applied to Caching.currentCacheForWriting.maximumAvailableStorageSpace. This will only be set if LimitCacheSize is true.

    In This Article
    • Properties
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)