I am developing a web application which constructs spec sheets for a product my company is developing. The data for different tests on the product is stored in a MySQL database. Based on which tests have been performed on the product (or if any of the previous results have changed), I would like the application to generate a new spec sheet.
The operation of generating a new spec sheet is fairly resource intensive, and so I would like to be able to cache older spec sheets if no values have changed. I was thinking of storing a hash or checksum value with the most recent spec sheet, and checking that against a hash of the values in the database which might have been added or updated. Is this considered a good practice? And if so, what would be the best way to generate this hash?
The possible data entries will consist of floats, integers and strings.
I am relatively new when it comes to server side web-dev, so there may be best practices for this problem that I'm not aware of. If it makes a difference, I am planning to implement this in Django.
Thank you very much!
Aucun commentaire:
Enregistrer un commentaire