Class CacheInitializationData | Addressables | 1.13.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class CacheInitializationData

    Contains settings for the Caching system.

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

    Properties

    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.

    Declaration
    public string CacheDirectoryOverride { get; set; }
    Property Value
    Type Description
    String

    CompressionEnabled

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

    Declaration
    public bool CompressionEnabled { get; set; }
    Property Value
    Type Description
    Boolean

    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).

    Declaration
    public int ExpirationDelay { get; set; }
    Property Value
    Type Description
    Int32

    LimitCacheSize

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

    Declaration
    public bool LimitCacheSize { get; set; }
    Property Value
    Type Description
    Boolean

    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.

    Declaration
    public long MaximumCacheSize { get; set; }
    Property Value
    Type Description
    Int64
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023