I'm indexing a dictionary file using sorted string as key and storing anagrams of key as array ref. Can I cache the hash to a file so I don't have to create it each request?

/usr/share/dict is the dictionary for testing purposes. I'm planning on using something from
posted by [UserVoice unlisted] • 6 years and 6 months ago Link