wrapped cache execution with a mutex