cache: only log lock/unlock if times spent is more than 1 ms