Stefano Padrin
Posts: 0
Joined: Tue May 07, 2013 8:07 pm

cache service response

hi

it's possible to cache response of the service?

i want ..
check connection
if (device is online) then call the service (and cache the result)
otherwise use the cache
it's possible? and how?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

cache service response

Apache Cordova (PhoneGap) included in every project has API to check if you are connected. As for saving the response, you can save it in local storage, for example.

Stefano Padrin
Posts: 0
Joined: Tue May 07, 2013 8:07 pm

cache service response

ok... but, how can wrap all my services with this control (cache and storage)?

apperyio files code are immedicable, it's right?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

cache service response

You could use Generic Service as one option.

You can also invoke a service from JavaScript, for example:
rest_service_name.execute({});

and then add any logic around it.

Return to “Issues”