changed cache to use NSCache