@SuppressWarnings("unchecked")
public <A extends Action<R>, R extends Result> Optional<R> getCachedResult(A action) {
if(!enabled) {
return Optional.absent();
}
Result result = resultCache.getIfPresent(action);
if(result != null) {
GWT.log("[Result Cache] Found cached result for " + action + " --> " + result);
}
return Optional.<R>fromNullable((R) result);
}