Hi Tim

This is what I mean with resource callback (GWT edition) :

                resource.retrieve(new Result<Account>() {

                        @Override
                        public void onSuccess(Account account) {
                                if (account != null) {
                                        setAccount(account);
                                } else {
                                }
                        }

                        @Override
                        public void onFailure(Throwable caught) {
                        }
                });

so account is NULL in onSuccess when I get 304 - No Modified as result. Thats 
because the response holds no entity in that case.
I am working in the browser (GWT).
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.

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 ?

A big thanks for helping me out so far.

thx

Koen

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

Reply via email to