title: How to cache files from FileField to avoid repeat (Django, DRF)
body: <p>Summary:</p>
  
  <p>I want to cache files that are read in from a FileField in order to optimize performance of the DRF api.</p>
  
  <p>Background:</p>
  
  <p>The system allows users to upload data files (csv-like) and stores a link to those files using a FileField (django/djangorestframework backends).</p>
  
  <p>The model object has additional methods that act on the data stored in the FileField file... i.e. get column names, number of rows, specific data queries (col A from ix 0 -> 10)</p>
  
  <p>Each of these methods requires the file to be read in prior to returning data.</p>
  
  <p>I'm finding that the required loading and reloading of the file object for every query is costing a ton of CPU &amp; response time.</p>
  
  <p>Is there a smart way to cache files that have been read in already (with a timeout) and have django prevent reloading files that are already cached?</p>
  
  <p>I've seen some info about memcached but that seems to be more geared toward caching specific API calls rather than the underlying DB objects/data.</p>
  
  <p>Thank you for your help!</p>