I use Azure-Storage to store information, such as a caching mechanism. So, for this input, I do the work for the first time, and after that I will save the result in the cache for future use. When I need to solve a problem with the same input, I get it directly from a ready-made solution from the repository. All this is implemented.
I am trying to add an expiration limit for a file in my cache. Each result will be stored for a maximum of 30 days. After that they will be automatically deleted.
The naive solution is to implement also a working background that will run once a day and will work on all files and delete them in accordance with their creation time.
Is there a better solution?
source share