I'm planning to use MongoDB GridFs to store different types of flat files, scripts etc. One of the benefits using GridFs is that it creates new document on every insert and thus can be used for versioning purposes using custom meta data etc.
However, how to ensure the fetched document is the latest document from GridFS ?
Appreciate any suggestions.