@SuppressWarnings("unchecked")
public <A extends Action<R>, R extends Result> void execute(A action, final AsyncCallback<R> callback) {
if(action instanceof HasProjectId) {
ProjectId projectId = ((HasProjectId) action).getProjectId();
ResultCache resultCache = getResultCache(projectId);
Optional<R> result = resultCache.getCachedResult(action);
if(result.isPresent()) {
GWT.log("[DISPATCH] Using cached result (" + action + ")");
callback.onSuccess(result.get());
return;
}