Cache of images
I'm trying to cache a bunch of images in an array and just set an MXML component property when it's time to reuse the image, but nothing ever happens. The image doesn't get displayed at all.
In my main MXML file, I have a function that does something like:
if (!avatarCache[take.user_id]) {
avatarCache[take.user_id] = new Image();
avatarCache[take.user_id].source = "http://localhost:732/user/avatar_redirect?id=" + take.user_id;
visibleTake.avatar = avatarCache[take.user_id];
visibleTake is an MXML component and avatar is an mx:Image tag. Nothing is shown where the mx:Image tag is. I tried setting width/height/x/y on the cached values. No dice.
I solved it by caching the URL of the image instead of the actual image object, and just repeatedly setting the Image tag's source property.
Similar Messages
-
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?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. -
Sharing/Caching (Dynamic) Images
I find that the Flash Player does not cache dynamic images
(even in the same session), so my question is, how would I share
images across multiple image components such that I can build an
asset provider of sorts to assit with caching images and other
assets?
I've tried a simplistic approach where in I assign the source
of one image component to another but then the first image
component goes blank and the image "transfers" to the second.
Not sure if BitmapData will help with this either.
Any help/direction is much appreciated.
Thanks.
Shiv.URL? Code?
Nancy Gill
Adobe Community Expert
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
2003)
Technical Editor: Dreamweaver CS3: The Missing Manual,
DMX 2004: The Complete Reference, DMX 2004: A Beginner's
Guide
Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
Web Development
"kidcobra" <[email protected]> wrote in
message
news:g2oqb0$bgq$[email protected]..
> PHP, dynamic images from mysql dbase....diplay on local
server, but will
> only
> display on web server if in the same level or folder as
the php page.
> Locally,
> I have put the path to the images in the dbase in front
of the URL of the
> image, and all works fine.... but with that path in
there and images not
> in
> same folder as page, no web server display. I know I'm
missing the
> obvious, but
> need help if anyone has the simple answer . Thanks
> -
2 HD laptop setup - Best place to put Catalog, Cache, and Images??
If I have two 500GB 7200rpm hard drives in my MBP, what is the best place for LR3, the catalog/previews, ACRcache, and the image files themselves?
SATA3 connection for both HDs
Should the boot drive hold the app and cache, while the second drive hold the files and catalog?
Should the catalog and cache always stay on the same drive?
Does it matter at all where the image (raw) files sit?
Thanks!!I'd just keep the images on a different drive with a 2 internal drive setup.
-
Mail Not Caching Loaded Images
Running Leopard and Mail 3.1 with multiple IMAP accounts:
So I like Mail's ability to NOT load images when I first view an email... it's a great way to avoid massive amounts of junk mail. My problem exists when I've told Mail that I DO want to load the images... they aren't being cached. So if I quickly view an email... load the images... jump to another email... then try to come back to the first one... none of the images are still there. Requiring me to reload them.
Is anyone else experiencing this? Am I missing a setting somewhere? It seems to me that these images should be cached by Mail somewhere on my machine so that I don't have to load them every time I view an email.Bump again. I can't seem to get Mail to load inline images no matter what I do. Mayday.
-K -
Caching all images residing in a specific directory
hi all,
i have installed on the same server Sun Web server 7 and Sun Application Server 9.1 My application is deployed on application server, whilst all requests are handled by the proper configuration on the web server.
I would like to know if it is feasible to cache the content of a particular directory ( the application is publishing content to it) to the web server without removing it from the cache.
thank you in advancethe whole architexture consists of the web servers and three application servers. each web and application server are located on separate machine. the application is deployed on the application server, however all requests are handled via the web server.
at the moment a common storage and a common doc root is used by the applications.
as this process is very expensive i want to check accelaration of performance by using a different doc root in the applications and cache all statis images in the web servers so as to improve i/o and performance. -
Cache loader images prior to loading?
hi,
is there a way to cache external jpg images prior to them
being called with the loader component? download them in the
background and not when the parent movieclip is loaded? i am trying
to keep the user from having to wait either at the beginning to
load the flash mc, or during it as well.
would it work if i had the parent html document preloadimages
or would flash be looking somewhere else for them?
also, can i use a fade effect on externally loaded images?
thanks for any helpFor the caching question, here's an approach (read all the
comments its not perfect) using flash loadVars.
http://www.actionscript.com/Article/tabid/54/ArticleID/Preloading-Files-into-the-Browser-s -Cache/Default.aspx -
Hello.
The problem is wit with images (OAImageBean), I have a page where the user can assign an image to an articule, or changing the image if the articule already have an image, In both cases the name of the image wil be saved as the name of the articule (example, A001 with extension .jpg)
the problem comes when the articule already have an image, bacause the browser saves in cache the first image that the articule already have, and when the user change the image and refresh the page (submitButon form, refresh,etc..) the same first image is till appearing,
I have to go to internet options and clear de chache so the image can be loaded again, and the new image appear on the articule
So I wanna know how I can load the new image each time the user change it?
is there a method for OAImageBean that can do that, or how this can be done?
regardsHi.
well Im not saving photos in database, im saving them on inside directories like OA_MEDIA, and using the components of OAImageBean to get that image, like
OAImageBean image = (OAImageBean)webBean.findchildrecursive(<id of region imgae>);
image.setSource(<the directory were i stored the image>);
everything works fine, its just that the image showing its the one that it's save in the cache of the browser
Example
Articule A001 have an image called A001.jpg (a pen)
--the browser show the pen
then the user change the image for a pencil
Articule A001 now have the image called A001.jpg (a pencil) (I overwrite the file so the new file is the pencil with the same name)
--but the browser still shows the pen because the browser save it on the cache
I have to go to internet options -> view file -> and then delete the file with the name A001.jpg
I refresh the page and now the browser shows the pencil (indicating that my code avobe its running correctly)
so I wanna know how I can get the image always directly from the server where the image is and not from the cache of the browser
or
another way to acomplish the correct visualization of the new image (not usign database, becuase thats not our requirement)
regards -
Where does Air cache loaded images?
MSIE caches all loaded files in Temporary Internet Files
folder.
Firefox - in something like C:\Documents and
Settings\user\Local Settings\Application
Data\Mozilla\Firefox\Profiles\blablabla.default\Cache
But where is the Air cache location?These things are using the browser's cache. If you were using RSL's that would be going to a location managed by Flash.
-
I'm trying to retrieve an image from Firefox's cache but so far have had no luck in doing so. The picture was hosted on imageshack and I had it open in a window but when I refreshed the page several hours later it was gone. I refreshed the page several more times, tried messing with the url to see if that did anything, but no luck. I haven't cleared anything on Firefox so I'm hoping there's some way I can recover it from the cache.
I followed the instructions on this page: http://groups.google.com/group/mozilla.support.firefox/msg/73bab3fb55ac5b42
However, when I right clicked the URL and chose "Save Link As..." it only saved a 1.7KB file that none of my photo editing programs can recognize or open. I've tried going to cache entries for other image links and saving them and when I choose Save Link As for those they save just fine, and in full size, so I'm not sure why this one won't work...I'm using Offline Mode so I'm not sure why the picture no longer being hosted online should make a difference one way or the other. I'm just hoping that my act of refreshing the page and nothing being there didn't overwrite the cache file and thus erase the cache'd image.
So is there any hope of retrieving this picture or is it gone for good?Hi.
Once the image in question is replace with another one, the old one is erased. That is to say, if you open an image, say www.domain.com/image.png, and it's a 200x200 image, then you close it, it's still on cache, and you can access it through the cache. But if the image is changed in the server, that same exact url, and you access it again, at you see a 250x200 image (just an example), then the 200x200 is gone forever.
Your hope is that you never accessed the same URL again, so the old cache wasn't erased. If you know the url of the image, simply select offline mode (File > Work Offline, I think) and access its url. It will load the cached version and not check for the online one. Only if there is a cached version, of course.
I hope this helps. -
How to cache images retrieved from MDM on Java WebAS
Hello Colleagues,
We have a scenario where we are trying to retrieve image records from the MDM using Java APis. Instead of hitting the DB everytime, is there a way to implement caching? For instance, is it possible to cache the images on the java WebAS and return the path of the images instead of returning the byte stream everytime?
Thanks and Regards,
Nisha
Edited by: Nisha NC on Sep 1, 2009 7:35 AMHi Nisha,
You can use the Class ObjectCache from the Java API.
For more information please refer to:
http://help.sap.com/javadocs/MDM71/current/API/index.html
Hope this helps,
Idan -
Don't Cache Image Source URI?
Is it possible to set an image source to a URI without the app caching the image to disk? I am streaming a JPEG file that is rewritten every 40ms and I want to refresh the image source to playback like a video but it's only loading the image once
and never refreshing it.
Thanks,
Gavin
EDIT I should note that this is my code. I am using the IgnoreImageCache option but it's not doing aything:
BitmapImage bmp = new BitmapImage(new Uri("http://192.168.94.53/image.jpeg"));
bmp.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
IMAGE.Source = bmp;
Also tried this and it didn't work:
IMAGE.Source = null;
BitmapImage bmp = new BitmapImage();
bmp.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
bmp.UriSource = new Uri("http://192.168.94.53/image.jpeg");
IMAGE.Source = bmp;Hi im.thatoneguy,
Try this:
private void Button_Click(object sender, RoutedEventArgs e)
image.Source = null;
BitmapImage bmp = new BitmapImage();
bmp.CreateOptions = BitmapCreateOptions.IgnoreImageCache;
bmp.UriSource = new Uri(@"http://10.168.196.118/iis-85.png?" + DateTime.Now);
image.Source = bmp;
Tested locally, works fine, adding timespan as GET request can help to refresh.
--James
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Disk cache javascript functions and images
Hi,
How can I force client browsers of my web application to cache the images and other javascript entities like css, functions, js files, etc.
By default it is not caching, though it should have. I have not written any code saying not to cache. Any help.
Environment : Tomcat server - java beans - jsp [struts framework]
In Netscape 7 if I say 'page view' it shows images and media files of my applications are not cached. Thats why application is really slow. If I compare this to some other web application which is fast, I see that media files, js files and images gets 'DISK CACHED'.]
Can anyone explain me what is disk cache and how to get it disk cached?
Thanks,
sunilThanks. I now understand whats the concept of disk cache.
But after lot of analysis also my problem still remains the same. Just that there are some patterns available.
I have some images in my own application. I also have some images which reference another site [application]. Interestingly all images which reside in my appication are not getting cached. All image which I refer into other site are getting cached. Can anyone makeout anything from this?
I looked into META tag generated for resulting htmls. But they dint have anything which says browser not to cache.
Can anyone list any java/jsp/html instructions which can tell browser not to cache stuff.
Or more importantly is there any setting or instruction or command which I can write in my java/jsp/html which can override any such setting done.
Thanks,
Sunil -
Page-embedded Javascript and uploaded images are not cached.
Hello All,
I was reading in Wiki APEX and I found this line mentioned as cons: "Page-embedded Javascript and uploaded images are not cached".
The question that I have posted many questions here how to enable the cache for Images and Javascripts but didn't get it right, is the wiki info right about the cache for images and JS?
thanks,
Fadi.Look at the bottom of this page as well [http://carlback.blogspot.com/2007/12/apex-and-3rd-party-js-libraries.html]
Patrick Wolf
Carl,
the only drawback with #WORKSPACE_IMAGES# and #APP_IMAGES# is that it doesn't get cached by the browser. So each page request will transmit the hole file again. A caching option for the "Static Files" in the Shared Components would be nice :-)
About lazy loading with the #WORKSPACE_IMAGES#. I could think about a mod_rewrite rule which translates the additional file request of the JS library into a valid request for APEX.
Carl Backstrom
In 3.1 we emit a last modified header now for uploaded files so that should help with browser caching.
I wonder if anything's changed since then.
Kofi -
hi ,
in my application i have to cache the image to some extend..
and that i need to clear the image cache as my url dont
change.
is there anyway programatically i can refresh the image ?
thanks"sohilr" <[email protected]> wrote in
message
news:ghts86$ls8$[email protected]..
> hi ,
> in my application i have to cache the image to some
extend..
> and that i need to clear the image cache as my url dont
change.
> is there anyway programatically i can refresh the image
> thanks
http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
Q7
Maybe you are looking for
-
How can I turn off document.write error in PTWC 2.0?
Hi everyone. I have an application that (unfortunately) avoids processing on the server and instead pushes a lot of JavaScript w/ document.write statements to the portal. Also, the code can't be changed so that it does server-side processing. I under
-
VMware Server 2.0.2 and Solaris 10 10/08 x86 doesn't install
Hi, I'm having trouble installing Solaris 10 using Server 2.0.2. I need Solaris 10 for dev/testing purposes. I don't have a spare 64-bit machine to run the latest vSphere Hypervisor 5.1 so I thought I would try Server 2.0.2 since it co-exists with
-
How to fix "no connected camera" error message on mac os x?
how do i fix this issue?
-
SRM - questionnaire submission by the supplier
I need help regarding all the settings required for the supplier self-registration questionnaire submission. we are using SRM 5.0. On filling the registration form(BSP application ROS_SLF_REG and submit a mail is sent to the mail-id specified , with
-
10.8 mac can't send messages to ichat 6 10.7.3 mac
so a friend of mine just got a new macbook pro. I am wanting to communicate with her on our macs. I have a macbook with 10.7.3 and ichat 6. When she sends me messages, they go to my iphone instead of ichat. When I turn off my iphone and she sends my