Details
Description
When a ResourceStreamResource is implemented to return a IResourceStream dynamically, by returning a new instance of an extended AbstractResourceStream, that ResourceStream is instantiated multiple times when a ResourceLink is clicked.
In my case, that ResourceStream returns an AttachmentInputStream from the Ektorp library (for CouchDB interaction). This behavior results in multiple queries (currently up to four) when I click once on a ResourceLink to that resource.
Code Examples
Extended ResourceStreamResource: http://pastebin.com/9BB7LEiV
Extended IResouceStream: http://pastebin.com/Z7GvzGja