CallbackFilter cachingCallbackFilter = new CachingCallbackFilter(cache);
CallbackFactory callbackFactory = new DefaultCallbackFactory(cachingCallbackFilter,
new ModelChangeCallbackFilter(eventBus));
DispatcherFilter cachingDispatcherFilter = new CachingDispatcherFilter(cache, callbackFactory);
Dispatcher dispatcher = new DefaultFilterawareDispatcher(cachingDispatcherFilter);
Defaults.setDispatcher(dispatcher);
Resource resource = new Resource(GWT.getModuleBaseURL() + "api/getendpoint");
final ExampleService service = GWT.create(ExampleService.class);