bofm/python-caching

Timestamp-independent ordering in SQLite storage

bofm opened this issue · 0 comments

bofm commented

Currently the cache cleanup and eviction functionality is dependent on the timestamp of the item. The timestamp is calculated when the item is saved to the cache storage. There is low probability of having the same timestamp in more than one item. Therefore the wrong one might be evicted. One possible solution might be to add an autoincrement field to the items in storage.