I'm using laravel 4 to build an app. The user logs in with their FB account and the friendlist is loaded in an object. Currently I'm saving that object in a session so I can use it across the site. However I've been told that it's better to cache the object as a file client-side.
How would I go about storing something like that clientside? Perhaps as a json file? Is there perhaps anything built into Laravel 4 that does/helps with this?
Currently I simply do Session::set($friendlist)
in laravel and then get it across pages.
I don't want to constantly query facebook since that's rather slow.
Just saw this because I am looking to prevent the same problem. Laravel's caching is your friend. You can cache just about anything -- including FB responses. A nice overview is here: https://laracasts.com/lessons/caching-essentials