Search Unity

Question CachedXMLHttpRequest not caching Asset Bundle requests anymore

Discussion in 'Web' started by thomasneuro, Feb 19, 2024.

  1. thomasneuro

    thomasneuro

    Joined:
    Mar 22, 2019
    Posts:
    8
    Hi,

    we recently realized that CachedXMLHttpRequest is not caching anymore. I believe it happened with update from Unity 2018 to Unity 2021 and already a while ago. When I checked the content of the IndexedDB there were a lot of old ones cached but after deleting the content the current version does not store anything anymore.

    I searched a lot for this topic but somehow did not find proper solutions. I read CachedXMLHttpRequest is included in Unity since version 2019, but when I remove the added library and delete the IndexedDB entrance it is not created newly. When I readd the extension the folder in DB is created again but no requests are stored.

    Im loading asset bundles with var request = UnityWebRequestAssetBundle.GetAssetBundle(path), so that should be fine from what I read.

    Data Caching is enabled in the build settings, UnityCache - RequestStore caches the build files like expected.
    I really dont know whats going on with the asset bundles, I just also read that using UnityCache for them is not really recommended so I would like to get the old way working again.

    Any help is appreciated, thanks in advance
     
  2. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598
  3. thomasneuro

    thomasneuro

    Joined:
    Mar 22, 2019
    Posts:
    8
    Hi,
    I was reading that topic already but I dont get any of the mentioned error messages.

    To try it out, where would I need to change this: var UnityCacheDatabase = { name: "UnityCache", version: 3 }; to var UnityCacheDatabase = { name: "UnityCache1", version: 3 }; on the new indexedDB system Module.UnityCache.?

    Im only working on the Unity part, so I dont know to much about the Frontend integration.
    Thanks