~It would be nice to find a way where we can use some sort of library to manage the exports folder with a caching system.~
~We are aiming to achieve both of the following benefits at the same time (notice how they sort of conflict with each other):~
~- To keep the folder from taking up too much storage space on the VM (currently we just delete files that are more than 2 hours old).~
~- To reduce load on the server if more than one user tries to export the same sequence. In that case, the pdf of the sequence has already been generated, so there is no point to generate it once more and we should serve the existing one. Ideally, two sequences being equivalent would mean that the json content of the yearList is equivalent, not just the raw request string.~
We want to add caching to any api request which performs some sort of processing. Good candidates inclue validate, export, and recommendedsequence
~It would be nice to find a way where we can use some sort of library to manage the
exports
folder with a caching system.~~We are aiming to achieve both of the following benefits at the same time (notice how they sort of conflict with each other):~
~- To keep the folder from taking up too much storage space on the VM (currently we just delete files that are more than 2 hours old).~ ~- To reduce load on the server if more than one user tries to export the same sequence. In that case, the pdf of the sequence has already been generated, so there is no point to generate it once more and we should serve the existing one. Ideally, two sequences being equivalent would mean that the json content of the
yearList
is equivalent, not just the raw request string.~We want to add caching to any api request which performs some sort of processing. Good candidates inclue validate, export, and recommendedsequence