Skip to main content
Solved

Issue on clearCache method on Content Explorer Widget?

  • September 5, 2023
  • 4 replies
  • 247 views

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();


Best answer by tjuanitas Box

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:



View original
Did this topic help you find an answer to your question?

4 replies

rbarbosa Box
  • Developer Advocate
  • 553 replies
  • September 5, 2023

Any errors on the console?


  • Author
  • Known Participant
  • 22 replies
  • September 6, 2023

There are no errors on the console.


  • Participating Frequently
  • 6 replies
  • Answer
  • September 13, 2023

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:




  • Author
  • Known Participant
  • 22 replies
  • September 13, 2023

Hi @tjuanitas,


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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings