docs: added a rather complete code sample to the "For Cache Locks".