Closed ewmson closed 6 years ago
@davisjam We should have a discussion on what we want the cache invalidation tests to look like.
One idea is to create a special directory with the invalidation tests that we clear after every cache invalidation test.
@ewmson
We should have a discussion on what we want the cache invalidation tests to look like.
Cache invalidation -> cache expiration time?
Agreed that you shouldn't use the default persistentDir because of the risk of collisions with cached user queries that have larger expiration times. How about path.join(os.tmpdir(), 'vuln-regex-detector-TEST-cache-expiration-time')
?
@ewmson Can you update the README with the new config option?
Problem: After a regex has been rescanned #45 the local client will still have the old result cached. This means a user who had previously received the result will never hit the server again and see the updated case.
Solution: Add an expiration time to the cached values that will require the server to be queried again once the time in the cache has exceeded this time. This should be configurable based on the needs of the client.
Fixes: #44