• Ken Manheimer's avatar
    Make non-persistent client cache use tempfile.TemporaryFile, so the · 0ddb4ae2
    Ken Manheimer authored
    tempfiles do *not* perpetually accumulate.  (TemporaryFile reliably is
    removed when the program is done with it, under both windows and
    unix.)
    
    ClientCache.__init__(): Set up the first TemporaryFile, and set both
    self._p file names to None, to signify use of temp files.
    
    ClientCache.checkSize(): Switch over to other persistent cache file if
    self._p has names, or a new TemporaryFile if they're None.
    
    (I included some comments to the code i touched, to ease the passage
    of anyone else who winds up on that path...)
    0ddb4ae2
ClientCache.py 13.1 KB