moved cache management to single class