refactor caching, simpler, DictionaryCache now works