I don't see anything about captureBlob() in the API docs for Gears. Would I need do download a nightly or something to get it? What additional step is required to create a reference, or does captureBlob() keep one?
More generally, does anyone have an example? Also, how will I know when disk space is getting full and clean-up is required? Or do I just need to guess based on average image size and number? On Nov 8, 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
