Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Create a cache clear functionality

Discussion in 'WebGL' started by GustavNinja, May 7, 2020.

  1. GustavNinja

    GustavNinja

    Joined:
    Jun 13, 2016
    Posts:
    86
    I have been trying to figure out the best way to make a cache clear functionality for webgl via javascript. My game has a lot of users that don't know how to properly cache clear so I wanted to make it easier by adding a button.
    I have had a couple of users that log in with an earlier version and some assetbundle doesn't get properly updated even though everything is version coded to prevent this.

    I have done some testing with using indexedDB.deleteDatabase and it seems to work properly but I have to manually select in code which indexedDB to delete.
    Currently deleteing "UnityCache" and "/idbfs".

    I have no problem with clearing PlayerPrefs data.

    I'm wondering if anyone has build a cache clear option before or had any problems with this. Or if there are any mayor big changes in 2019 or 2020 that I should be aware of when updating.

    Currently on 2018.4.3f
     
  2. bigbrainz

    bigbrainz

    Joined:
    Jul 21, 2015
    Posts:
    175
    @GustavNinja, did this end up working smoothly for you? Were in 2020 now.
     
  3. GustavNinja

    GustavNinja

    Joined:
    Jun 13, 2016
    Posts:
    86
    @bigbrainz
    We made a JavaScript and made this and it worked. Still works in 2019.4 so we have no problem with this.
     
    Yulorda likes this.
  4. Yulorda

    Yulorda

    Joined:
    Feb 21, 2019
    Posts:
    1
    cengage-jsal and mvarlamovBS like this.