Skip navigation
Currently Being Moderated

Storefront getFolioData

Jul 29, 2012 10:54 PM

Tags: #custom_storefront #getfoliodata

Hi,

 

I'm debugging my storefront right now so that it works properly with my client's entitlement server. What I'm trying to do is to show all the entitled folio when a user is logged in and hide them when the user are logged out. Currently i'm using setInterval to check if the user is logged in every few secs and refresh the page. But after I refresh the page, I found out that sometimes i caught an exception "ReferenceError: Can't find variable: adobe" in my iPad, and I might not get the correct information from getFolioData. I also noticed that according to the API - "if no current or cached information is available, the function will return an empty list". So my questions are:-

  1. Does it means that the data that shown in my iPad might be the cached information?
  2. How can I force it to get the current information everytime?

 

Thanks in advance =]

 
Replies
  • Bob Bringhurst
    3,494 posts
    May 29, 2007
    Currently Being Moderated
    Jul 30, 2012 1:00 PM   in reply to Gary Teh

    I asked someone who has more experience with custom entitlement than I do. He says the viewer caches the folio list, so it doesn't have to fetch and parse it every time someone looks at the library.  You should not worry about the returned data being stale.  It will return the data that the viewer is currently using. However, you should register for an updateLibrary() event. This will get called whenever the state of the user changes.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points