On Wed, Dec 3, 2008 at 5:07 PM, Alexander Rakoczy <[EMAIL PROTECTED]> wrote:
> Shoes does cache all remote image loads.  It uses expire times, which
> is similar to how a browser would tell whether or not the image is
> stale and needs to be re-fetched!

Yeah, but what I mean is.. I have to initially go out and scrape a URL
to find the image source. Once I get it, I render it. After I've done
this once, I don't need to ever go check that URL again. It's possible
a twitpic image might update, but not likely, especially for the life
of a tweet in the Aglet timeline. So, I'm storing the source I scraped
for the life of my application to avoid running the download() block
again later.

I got off my lazy butt and looked into the source and at the contents
of ~/.shoes/+cache ... looks like maybe I could apply the same hash
algorithm to the source I scrape and check for that file in the cache?
Seems like it might be just fine and simpler to keep track of fetched
sources myself.

Does it seem at all useful to people if there were perhaps something
possible like Shoes.cached_image?(src) though?

-- 
Seth Thomas Rasmussen
http://greatseth.com

Reply via email to