Cache data in enyojs

Hello all,
how to use cache data from response server api?
Thank you.


  • Can you provide some more details on what you're trying to accomplish?
  • in my app, i need call to server to get data in first time, and i want cache data response for use other time so i cannot call api to get data.
    please help me, thank you.
  • You'll probably want to use local storage for that.

    If I remember correctly, you can override the "fetch" and "fetched" function in the model/collection to check for cached data or save the retrieved data to cache.

    I use lscache to access local storage:
  • Hi @psarin can you share example overide fetch and fetched with localStorage?
    thank you so much.
  • i using blob in html5 app running in webOS smarttv as examble:

    var blob = new Blob([JSON.stringify(data)]); var blobURL = window.URL.createObjectURL(blob); console.log(blobURL);
    it working in chrome webbrowser and return link with data in response:

    but when running app in webOS smarttv it return invalid link with absolute path and cannot get data from this link:
    How to fix it to get data blob link.
Sign In or Register to comment.