Implement a cache rollback on command failure

Change-Id: I3a80333f4175fc287d7d115e1152aacff6396990