diff --git a/CHANGES.md b/CHANGES.md index b94c3c4c..3ad10d51 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ * Update CacheControl 0.13.1 (783a338) to 0.14.0 (e2be0c2) * Update certifi 2024.02.02 to 2024.06.02 * Update dateutil 2.8.2 (296d419) to 2.9.0.post0 (0353b78) +* Update diskcache 5.6.3 (323787f) to 5.6.3 (ebfa37c) * Update feedparser 6.0.10 (9865dec) to 6.0.11 (efcb89b) * Update filelock 3.12.4 (c1163ae) to 3.14.0 (8556141) * Update idna library 3.4 (cab054c) to 3.7 (1d365e1) diff --git a/lib/diskcache/core.py b/lib/diskcache/core.py index 46f5532b..461a4359 100644 --- a/lib/diskcache/core.py +++ b/lib/diskcache/core.py @@ -532,7 +532,7 @@ class Cache: sql( 'CREATE INDEX IF NOT EXISTS Cache_expire_time ON' - ' Cache (expire_time)' + ' Cache (expire_time) WHERE expire_time IS NOT NULL' ) query = EVICTION_POLICY[self.eviction_policy]['init'] @@ -2030,7 +2030,10 @@ class Cache: """ sql = self._sql - sql('CREATE INDEX IF NOT EXISTS Cache_tag_rowid ON Cache(tag, rowid)') + sql( + 'CREATE INDEX IF NOT EXISTS Cache_tag_rowid ON Cache(tag, rowid) ' + 'WHERE tag IS NOT NULL' + ) self.reset('tag_index', 1) def drop_tag_index(self):