Re: Persisting ContentCache to disk between sessions

2018-10-29 Thread Erik Thomas
everyone for your ideas. >> >> Alex, I already knew how to do the serialization by encoding/decoding, > and >> I may go down that path someday, but if FileStream would just serialize a >> ContentCache (seems like a common want), it would have been a quick >>

Re: Persisting ContentCache to disk between sessions

2018-10-29 Thread Javier Guerrero García
PM Erik Thomas > wrote: > > > Thanks everyone for your ideas. > > > > Alex, I already knew how to do the serialization by encoding/decoding, > and > > I may go down that path someday, but if FileStream would just serialize a > > ContentCache (seems like a comm

Re: Persisting ContentCache to disk between sessions

2018-10-29 Thread Erik Thomas
it helps ;-) On Mon, Oct 29, 2018 at 6:22 PM Erik Thomas wrote: > Thanks everyone for your ideas. > > Alex, I already knew how to do the serialization by encoding/decoding, and > I may go down that path someday, but if FileStream would just serialize a > ContentCache (seems lik

Re: Persisting ContentCache to disk between sessions

2018-10-29 Thread Alex Harui
Volunteers are welcome to provide a patch that makes ContentCache serializable. IIRC, lots of Flash classes are not serializable, but IExternalizable allows you to define custom serialization. -Alex On 10/29/18, 10:22 AM, "Erik Thomas" wrote: Thanks everyone for

Re: Persisting ContentCache to disk between sessions

2018-10-29 Thread Javier Guerrero García
too much trouble. Hope it helps ;-) On Mon, Oct 29, 2018 at 6:22 PM Erik Thomas wrote: > Thanks everyone for your ideas. > > Alex, I already knew how to do the serialization by encoding/decoding, and > I may go down that path someday, but if FileStream would just serialize a &g

Re: Persisting ContentCache to disk between sessions

2018-10-29 Thread Erik Thomas
Thanks everyone for your ideas. Alex, I already knew how to do the serialization by encoding/decoding, and I may go down that path someday, but if FileStream would just serialize a ContentCache (seems like a common want), it would have been a quick improvement to app responsiveness. Having

Re: Persisting ContentCache to disk between sessions

2018-10-27 Thread Alex Harui
and update the image in the app. The way a ContentCache is used for BitmapImage and Image is to set the loader like this: public static var imageCache:ImageCache = new ImageCache(); // subclass of ContentCache _image.contentLoader = Model.imageCache; _image.sourc

Re: Persisting ContentCache to disk between sessions

2018-10-27 Thread Greg Dove
06:13 Erik Thomas, wrote: > >> Hi Alex: >> >> The icons and logos are loaded from a server on startup, and then kept up >> to date via a 20 second polling pattern where the app checks if anything >> has changed on the server. We timestamp all images and when one does cha

Re: Persisting ContentCache to disk between sessions

2018-10-27 Thread Greg Dove
ling pattern where the app checks if anything > has changed on the server. We timestamp all images and when one does change > we get latest and update the image in the app. > > The way a ContentCache is used for BitmapImage and Image is to set the > loader like this: > > public stati

Re: Persisting ContentCache to disk between sessions

2018-10-27 Thread Erik Thomas
a ContentCache is used for BitmapImage and Image is to set the loader like this: public static var imageCache:ImageCache = new ImageCache(); // subclass of ContentCache _image.contentLoader = Model.imageCache; _image.source = "https/someImageUrl" When the image is first retrieved fr

Re: Persisting ContentCache to disk between sessions

2018-10-26 Thread Alex Harui
persisting a ContentCache to disk and reading it back on app launch? We have lots of icons and logos for hundreds of companies and they don't change between sessions. Like this (doesn't work though). ImageCache is a subclass of ContentCache to get access to the protected cachedData:Dictionary wh

Persisting ContentCache to disk between sessions

2018-10-26 Thread Erik J. Thomas
Hey all: Have any of you come across an example of persisting a ContentCache to disk and reading it back on app launch? We have lots of icons and logos for hundreds of companies and they don't change between sessions. Like this (doesn't work though). ImageCache is a subclass of ContentCache

Re: ContentCache

2017-08-31 Thread Erik J. Thomas
, 2017, at 3:11 PM, bilbosax <waspenc...@comcast.net> wrote: Thanks Erik! I have got things underway and am already seeing improvements, but I have a lot more tweaking to do. Do you have any idea what the enableQueing function does in the contentCache? The documentation is a little bit

Re: ContentCache

2017-08-31 Thread bilbosax
Thanks Erik! I have got things underway and am already seeing improvements, but I have a lot more tweaking to do. Do you have any idea what the enableQueing function does in the contentCache? The documentation is a little bit vague -- Sent from: http://apache-flex-users.246.n4.nabble.com/

Re: ContentCache

2017-08-31 Thread Erik J. Thomas
also caches all the content as a snapshot for performance. If you will have data changing in the renderer a lot, then you don't need to set this to true, but it's a good idea if performance is an issue. 2. Add a ContentCache class variable (I named mine iconCache): static private const iconCache:Con

Re: ContentCache

2017-08-31 Thread Erik J. Thomas
you don't need to set this to true, but it's a good idea if performance is an issue. 2. Add a ContentCache class variable (I named mine iconCache): static private const iconCache:ContentCache = new ContentCache(); 2. Set iconCache.maxCacheEntries to the max number you'll need to cache in

ContentCache

2017-08-30 Thread bilbosax
In my AIR app, I am having to download a lot of images to display, especially in lists. I need a good tutorial on how to cache these images using ContentCache, but am having trouble finding any solid examples on the net. Does anyone know of a good place to find out how to effectively use

What's in the ContentCache?

2013-09-25 Thread Tintin
Hello My application displays some images which are held in a ContentCache. While the initial images are downloading a dialog box displays to inform the user that the images are downloading. As the user interacts with the application different images are displayed. How do I test if an image

Re: What's in the ContentCache?

2013-09-25 Thread Lee Burrows
I guess the key passed to getCacheEntry is the source for the image; a URL string in your case i imagine. So if getCacheEntry returns null, image is not in the cache On 25/09/2013 13:14, Tintin wrote: Hello My application displays some images which are held in a ContentCache. While