refactor using NSCache()