thread-safe cache - re-check value after obtaining writer lock