Added readers-writer lock synchronization for cache