dictionary_cache implementation using shelve