add thread-safety to cache entries (including rows).
performance may be improved.
there may be remaining deadlocks!