Hot answers tagged json
A lot depends on how much traffic you expect to see and how often this situation will occur. To avoid premature optimization, I'd first go with a variation of your 2nd choice - treat the duplicate request as an error (and log it as such). If you see it happening often enough to warrant action, then your 1st choice - cache the output - seems reasonable. ...
It is sometimes a better fit for the application to store a complete document as one entity. It is not a coincidence that nosql and document databases are on the rise. If you are aware of the drawbacks it can be an ok approack but you should also consider a real document database instead of inventing your own.
Only top voted, non community-wiki answers of a minimum length are eligible