Make non-persistent client cache use tempfile.TemporaryFile, so the
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...)
Showing
Please register or sign in to comment