title: Caching/storage strategies for implementing a word dictionary in App Engine
body: <p>I am looking at using a spell checker for my GAE app and we have an algorithm already for spell checking, but I'm trying to figure out how to best store and load dictionary files for best performance. </p>
  
  <p>I am considering the following strategies:</p>
  
  <ol>
  <li>Place the dictionary data in a text file(s) in local app engine storage and load/read them using standard IO methods (<code>open()</code>,<code>read()</code>,etc)</li>
  <li>Place the dictionary data in GCS and load/read using GCS IO methods</li>
  <li>Place the dictionary data in an <code>ndb.model()</code> and load/cache information</li>
  </ol>
  
  <p>One cache I don't quite understand is the context cache -- is this cache that is attached to a given instance? I.e. if I have a resident instance that is spun up, can I go ahead and load the dictionary data into the instance's RAM and thus accessing data should be extremely fast (microsecond vs millisecond seek/get times)? The dictionary data will probably be a sharded list of some sort that we'll optimize for performance. Are there other data storage methods/structures I'm not considering here that may be more appropriate? Thanks.</p>