Client-side Caching with RequestFactory

79 views
Skip to first unread message

Robert Porter

unread,
Jul 20, 2011, 2:37:48 PM7/20/11
to google-we...@googlegroups.com
Hello,

I'm looking for advice on the best way to implement client-side caching with RequestFactory.  I have a fairly large amount of data (a list of domain objects) that must be used by several parts of my application.  Furthermore there are a few operations that "dirty" the cache and will require it to be reloaded.

One possibility is that I could delegate all RequestFactory calls (for this specific object) through a class that does the caching -- but this seems really ugly.  Ideally I would like to do this behind the scenes so that throughout the app.

An option that would probably work a bit better is if I could create my own caching implementation of the RequestContext -- but is that possible?

Any thoughts or suggestions?

Thanks!

Thomas Broyer

unread,
Jul 20, 2011, 5:00:57 PM7/20/11
to google-we...@googlegroups.com


On Wednesday, July 20, 2011 8:37:48 PM UTC+2, Robert Porter wrote:
Hello,

I'm looking for advice on the best way to implement client-side caching with RequestFactory.  I have a fairly large amount of data (a list of domain objects) that must be used by several parts of my application.  Furthermore there are a few operations that "dirty" the cache and will require it to be reloaded.

One possibility is that I could delegate all RequestFactory calls (for this specific object) through a class that does the caching -- but this seems really ugly.

Not that ugly if you think of RF as an implementation detail and your class as a higher-level API/DAO.
 
Ideally I would like to do this behind the scenes so that throughout the app.

An option that would probably work a bit better is if I could create my own caching implementation of the RequestContext -- but is that possible?

Your RequestContext is just an interface, so you can provide your own implementation, wrapping the one generated by the RequestFactoryGenerator to add caching.
This is the same approach as was suggested/recommended 2 years ago with GWT-RPC (Ray Ryan at Google I/O)

Ido

unread,
Oct 30, 2011, 10:52:14 AM10/30/11
to google-we...@googlegroups.com
Hi Robert,

Any progress on this thread, I'm looking for a solution for the same issue.

Thanks a lot for any response,
Ido
Reply all
Reply to author
Forward
0 new messages