Implementation of optimistic locking and second level cache (sans
monitoring)