cache is now thread safe, removed unused code