lincolnloop / amygdala

RESTful HTTP client for JavaScript powered web applications
BSD 3-Clause "New" or "Revised" License
393 stars 22 forks source link

Are remote accesses automatic? #6

Closed kokujin closed 10 years ago

kokujin commented 10 years ago

From the docs // Get the list of active users from the local cache var users = store.findAll('users', {'active': true});

What happens if the localstorage returns nothing, for example, its the first access, does it trigger a get on the remote resource? Thanks

mlouro commented 10 years ago

@kokujin it will return an empty array. It's up to the developer to determine what to do with that information, sometimes you may not want to do a call (if you're working offline), so this gives the most flexibility.