Skip to main content
Known Participant
Sep 5, 2023 12:38 PM UTC
Solved

Issue on clearCache method on Content Explorer Widget?

As per Box documentation, the clearCache function of Content Explorer should force reload the items. But when I call the same function, I don’t see any reload of items in Content Explorer widget.

I am using Content Explorer version 17.1.0.

/**

  • Clears out the internal in-memory
  • cache for the content explorer forcing
  • re-load of items via the API.
  • @public
  • @return {void}
    */
    contentExplorer.clearCache();
Box Employee
Sep 13, 2023 4:31 AM UTC

Hey @Niladri!

I can see where there’s confusion with that comment. The clearCache() method won’t actually immediately re-load the items, it just means the next time a network request should be made, it will not use any cached result.

You can see the implementation of the method here:

4 replies

rbarbosa Box
Developer Advocate
Sep 5, 2023 8:09 PM UTC

Any errors on the console?

Translate
NiladriAuthor
Known Participant
Sep 6, 2023 10:52 AM UTC

There are no errors on the console.

Translate
Box Employee
Sep 13, 2023 4:31 AM UTC

Hey @Niladri!

I can see where there’s confusion with that comment. The clearCache() method won’t actually immediately re-load the items, it just means the next time a network request should be made, it will not use any cached result.

You can see the implementation of the method here:

Translate
NiladriAuthor
Known Participant
Sep 13, 2023 10:39 AM UTC

Hi @tjuanitas,

It’s great to have a better understanding of how the “clearCache” method operates, thanks to your explanation.

Translate