>> In that case I would just fetch the Blobs, and keep a reference so >> they don't get garbage collected. > > Wouldn't the blobs need to be captured with > ResourceStore.captureBlob(...) before you can view them as images > through DOM manipulation or a straight <img> tag?
I was thinking more about Dave's request for storing Blobs in the DB, for caching purposes. Generally speaking, in-memory Blobs make more sense than Database Blobs, if cross-session persistence isn't a goal. But yes, it also depends how Dave plans to use these Blobs. Raw Blobs (regardless of whether they are in-memory or in-database) cannot be attached to an <img> tag. So LocalServer is the way to go in that case. On Sat, Nov 8, 2008 at 1:21 AM, Khookie <[EMAIL PROTECTED]> wrote: > > Chris, > >> In that case I would just fetch the Blobs, and keep a reference so >> they don't get garbage collected. > > Wouldn't the blobs need to be captured with > ResourceStore.captureBlob(...) before you can view them as images > through DOM manipulation or a straight <img> tag? > > And also, I assume that anything captured with captureBlob(...) can be > removed with remove(...) when the blob isn't required anymore? That > way, Dave can create his image caching slideshow. > > Cheers > > Chris > > On Nov 8, 1:59 pm, Chris Prince <[EMAIL PROTECTED]> wrote: >> > Thanks. So is there a better way to do this in Gears? Again, I'm >> > running a changing slideshow with lots of images in it. The page won't >> > refresh very often but will pull in new images periodically. Keeping >> > them all in memory is probably a bad idea so I want to cache them on >> > disk...but as that cache gets big I'll need to prune it >> >> Oh, so you plan on being connected? And you are mostly interested in >> caching, rather than persisting the data across browser sessions? >> >> In that case I would just fetch the Blobs, and keep a reference so >> they don't get garbage collected. >> >> For in-session caching, I wouldn't worry too much about whether the >> representation is in-memory or on-disk. You should be able to rely on >> Gears and the operating system to Be Smart About It (tm). >> >> FWIW, there was a discussion about automatically spilling large Blobs to >> disk.http://groups.google.com/group/gears-eng/msg/d589bd81968561ee >> >> And even without that, the OS will spill to the user's paging file as >> needed. You should get the effect you want today. >> >> Are you not seeing that? >> >> --Chris >
