LSIF: Cache entry TTLs
Created by: efritz
This PR puts a maximum lifetime for entries in the LSIF caches.
This updates the cache class. Now the getEntry
function will run a validation function on the cache value if it hasn't been checked within its expiry. There are two types of validation here:
- sqlite connections are validated by comparing the db file's mtime against the last time the validation function was run, and
- decoded results from the sqlite database are removed from the cache unconditionally after the TTL. This is because we don't currently track which db the results came from.
This adds no new concurrent behavior.