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) -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/HIkdQEDKrpEJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
