Accessing Social data
this is another, hopefully my last, really simple question, and it relates to best practice using SpringSocial.
I have setup the LinkedIn integration on a web app that I am developing and having let my users authorize the app to access LinkedIn, I want to use some of the data in the users LinkedIn profile as part of the users public profile on the site.
Whats the best (practice) approach? everytime someone accesses a users public profile, should the app connect to LinkedIn using the viewed user's (the user whose profile is being viewed) access token etc and retrieve the latest LinkedIn profile data required? or is it better to persist the users linkedIn profile when the viewed user first authorizes the app to use linkedin and then only refresh when the user nexts logs in/requests to update the data?
That said, I'd also avoid making unnecessary remote calls. I think there'd be nothing wrong with doing some sort of caching of the data and only re-fetching once per session, once per day, or some other frequency to avoid making long-term calls. Or you could just use Spring 3.1's support for declarative caching.
Perfect. Thanks, I have added Springs declarative caching with ehcache to fetch the data more regularyly.