I understand that your page should contain a dictionary for an invariant list of words. If the list of words is invariant, and if the resulting dictionary is also invariant, then why not cache the entire content of the page? This will ensure a constant access time for all users.
A common template for this use case is to compute a list of words in a key suitable for searching a data store, such as memcached . Performance seems to be important to you, and in this case, displaying the page requires one unidirectional transition to the data store and virtually no processing.
If users can interact with the word list, it will be time to invalidate the cached page. There again, one single return path to the data warehouse is required.
source share