Repository navigation
diskcache-oxide 0.4.7
No format change: caches made by 0.3.5 and later open as they are. Fixes from a bug, race and security review of 0.4.6.
Fixed
DjangoCache.delete_manyunderdurable=Trueno longer stops at a missing key once the batch has run for half a lock wait, which left every key after it undeleted on a healthy cache (with the default 1.0 s lock wait, any missing key after the first half second of a long batch; with a lock wait of 0, the first missing key).set_manyhad the same flaw for a key that failed at once: it and every key after it were returned as not stored without being tried. Both now stop only at a call that itself waited half a lock wait, which is what a held lock looks like, and with a lock wait of 0 they try every key.pull()on atimeout=0handle withon_decode_error='miss'raisedTimeoutafter removing an unreadable item from the front of the queue, although nothing held the lock, and so did any handle whose timeout ran out just as the item was removed. It now goes on to the next item, as documented; only a puller that loses a race with no time left raisesTimeout.check(fix=True)removed the row of a value whose file it couldn't look at, as if the file were missing: a value folder without permission, or any other error from the file system, cost a whole entry and left its file behind as an orphan. Only a file that isn't there counts as missing now, as for a read; any other error ends the check with thatOSError, and nothing is removed.remove_old_formats()on an oldFanoutCacheroot removed a shard's database when it couldn't tell its format: an empty file (which a process creating the shard holds for a moment), a database with no format stamp, or a file that isn't a database. It now leaves and reports them, as it always has for a plain cache, and as its documentation said.- With
serializer='json', a dict with non-strkeys nested 43 or more deep (each inside the last) was stored bysetand then couldn't be read back:getraisedCorruptValueError, or withon_decode_error='miss'deleted it as a miss.setnow raisesTypeErrorfor it, as for any value nested too deep, from 41 levels. msgpack was never affected.