2 Replies Latest reply on Nov 27, 2006 11:16 AM by The Albino

    Caching Query Image Stream

    The Albino Level 1
      Currently I am working on a CMS of sorts and the higher-ups wanted to have some digital asset management capibilities. All images are now being stored in SQL2k5 in binary form. On a page that contains the image, I have a the image src="myImageLoader.cfm?imageId=x" where x is the id of the image to load.

      This all works fine, however if the user returns to a page that they have previously visited, the image is not cached and must restream out. Any ideas on how to cache the image after it has been streamed?

        • 1. Re: Caching Query Image Stream
          MikerRoo Level 1
          The only smart way to do this is to write the image out as a regular file and link to that.
          Caching, handshaking, and compression are then handled beautifully by the web server and client browser.

          The only thing you would (possibly) need to do is to run a job every few days to clean out stale (or access limited) files.

          Otherwise, you will need to set the "last modified" and "expires" headers and to monitor for and process the "If-Modified-Since" header.
          • 2. Re: Caching Query Image Stream
            The Albino Level 1
            Thanks, I eventually had to go this way. I was finally able to explain to my boss streaming = no cache