Memory-efficient cached trie and trie storage.