On Sat, Jan 28, 2012 at 8:35 AM, Koen Maes <[email protected]> wrote:

> This is what I mean with resource callback (GWT edition) : [...]
> so account is NULL in onSuccess when I get 304 - No Modified as result.
> Thats because the response holds no entity in that case.
>

Ah, GWT -- now I see what you mean.



> Now is my question, if I can have the cached version in the onSuccess
> callback. Otherwise, I must always hold the previous copy of Account in a
> variable, and then I feel like implementing a cache myself. I dont believe
> that can be the goal.
>

As I said, "If you have a programmatic client, like a Restlet
ClientResource-based program, you have to manage client-side caching
yourself."



> I already tried sending a max-age from the server to the client and also
> from the client to the server but it never hits the cache.
> Can you put me on the right track ?
>

I expect Restlet will one day offer its own client-side caching, but for
now I think you have to roll your own. Here's a starting point:

http://stackoverflow.com/questions/2362626/client-side-caching-in-gwt

Restlet folks correct me, please, if I'm wrong!

--tim

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2912247

Reply via email to