Caching registerBufferProtocol Requests


I have implemented a registerBufferProtocol-Handler which serves blobs, but those are mostly images. In my app I have a feed of messages where I include these images. When I switch from one page to another and then back to the primary page these images are not cached and are loaded again from the blob handler. Is there a way to cache these requests? The most easy way I could think of would be to set some headers, but that does not seem to be possible?! Also I want to return 404 if the blob does not exists, is that also possible?

Thanks for your time and help!