Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Add ability to cache / reuse scan results by SHA1 #12

Open
volodymyrsmirnov opened this issue Oct 27, 2020 · 2 comments
Open

Add ability to cache / reuse scan results by SHA1 #12

volodymyrsmirnov opened this issue Oct 27, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@volodymyrsmirnov
Copy link
Owner

Think about the way to cache SHA1 hash-sum of scanned files in order not to scan same files from multiple sources more than a single time.

@volodymyrsmirnov volodymyrsmirnov added the enhancement New feature or request label Oct 27, 2020
@P3GLEG
Copy link

P3GLEG commented Mar 17, 2021

How do you feel about using the Redis backend to hold this info?

@TristanWasTaken
Copy link

It would be a good idea to save the hash directly with Redis or in the MongoDB database with Redis caching.
I would generate the hash when uploading files from the browser/client and send it to the api. If the hash is already in the database, I would reject the upload and use the data saved for the hash. This saves time and computing power. In addition, if the hash that was sent to the api is not in the database and the file was uploaded, I would let the server check the hash again. Someone could alter the hash and use it as an attack and fill the server's hard drive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants