Use a dedicated field for cached search timestamps

Fix a cache corruption issue by using a new "cached" field to hold
the timestamp for cached correlation search results. Previously the
"description" field was being overloaded, but this could cause the
cache to no longer load because of duplicate fields.
This commit is contained in:
Jeremy Stanley
2020-05-31 00:24:10 +00:00
parent 5515f756d4
commit 74a9ee62f6

View File

@@ -1134,7 +1134,7 @@ def guess(
)
search_cache = ["\n"]
search_cache.append( "[%s]\n" % search[0] )
search_cache.append( "description = cached %s\n" % nowstamp )
search_cache.append( "cached = %s\n" % nowstamp )
for uriname in sorted(uris.keys()):
search_cache.append( "%s = %s\n" % ( uriname, uris[uriname] ) )
real_cachedir = os.path.expanduser(cachedir)