Search Unity

Question Addressable Assets + CCD Cache questions

Discussion in 'Unity Cloud Content Delivery' started by matchbox, Jan 25, 2022.

  1. matchbox

    matchbox

    Joined:
    Jun 14, 2016
    Posts:
    30
    Hi,

    I am evaluating different solutions for our current project. The addressable Assets in conjunction with the CCDN solution sounds like a good solution for our needs.

    Can you please confirm that
    Addressable Assets are only downloaded from CCDN the first time used and then stored in the local cache of the regarding device and only downloaded again when the regarding assets in the CCDN bucket changed and differ from the assets in the cache.

    What happens when assets from a bucket in the CCDM are deleted, will they be removed from the local cache on the device?

    Can the assets still loaded from the device cache when the device is offline?

    Are there limitations of the device cache like size, duration, etc? Are there difference in the behavior of the device cache on different devices/systems like pc and mobile for example?

    Thanks for you help,
    Marco
     
  2. davidla_unity

    davidla_unity

    Unity Technologies

    Joined:
    Nov 17, 2016
    Posts:
    763
    Hello,

    I can confirm that downloaded AssetBundles are stored in a local cache. They'll only be downloaded again if the AssetBundle changes, or if the cached bundle is ejected. We use the engine's Caching API, which you can checkout here: https://docs.unity3d.com/ScriptReference/Caching.html It is a LRU cache that can run out of allocated space and start ejecting AssetBundles. A cache also has an expiration of 150 days (by default)
    https://docs.unity3d.com/ScriptReference/Cache-expirationDelay.html.

    No, they won't be deleted. When trying to load the bundle, it'll check the cache first and just continue to load that if it's available.

    Yes, it can load from the cache when the device is offline. There would only be a problem if the cached bundle wasn't available and the device was offline.

    For general cache questions:
    https://docs.unity3d.com/ScriptReference/Caching.html
    https://docs.unity3d.com/ScriptReference/Cache.html

    I'll call out this line specifically since I noticed it on the page https://docs.unity3d.com/ScriptReference/Cache-maximumAvailableStorageSpace.html
     
  3. matchbox

    matchbox

    Joined:
    Jun 14, 2016
    Posts:
    30
    Thanks for your answer David, helped me a lot.

    Thank you,
    Marco
     
    davidla_unity likes this.
  4. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    I am experiencing where the CCD is downloaded on every run of the program instead of first checking to see if the package is in cache already, I can confirm that the package is in the correct folder on the client machine, so why would it still download again which uses delivery, so if the package is 125MB every load from the client, even with the package in cached local, is still a hit of 125MB from the CCD system.
     
  5. Unity_JonathanCl

    Unity_JonathanCl

    Unity Technologies

    Joined:
    Feb 24, 2022
    Posts:
    15
    Hi @zumwalt, continuing the conversation in this thread: https://forum.unity.com/threads/ccd-doesnt-load-and-use-scripts.1272422/