• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOResourceManager and Memory Usage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOResourceManager and Memory Usage


  • Subject: Re: WOResourceManager and Memory Usage
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 12 Apr 2005 11:01:54 -0700

On Apr 11, 2005, at 8:52 PM, Andrew Lindesay wrote:

I'm using WOResourceManager to load in data...

	WOResourceManager rm = ...
	...
	rm.setData(data,code,"image/jpeg",session());

Seconds later it's yanked out using a URL during the response phase...

	context().completeURLWithRequestHandlerKey(
		"wr","","wodata="+code,false,0);

Does anybody know what happens to the resource-manager-coded-data at that point? Is it *necessary* to clear out those manually inserted entries by hand?
See the setData method JavaDocs:

"By default when a dynamic element requests an image from the database, or builds a graph on the fly, it tells the resource manager to store its data in a cache, using either a developer-specified key, or a random key. In return the dynamic element inserts a special url in the HTML so that the browser, on callback, can retrieve the data out of the resource manager cache and display it. If the key was specified by the component, the data stays in the cache as long as the cache is not flushed. If the key was randomly generated by the resource manager, the data is removed from the cache (using removeDataForKey), as soon as the browser retrieves it."

In other words, yes, as long are you are specifying the key.


I should imagine that in the case of a situation where this might be used with a regular "WOImage", it would impossible to remove the entries from the resource manager as the client may still be downloading them.
That is not how it works. The apps sends it to the web server and the web server streams it to the browser. No need for you to worry about this in your app.

Chuck

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: WOResourceManager and Memory Usage
      • From: Andrew Lindesay <email@hidden>
References: 
 >WOResourceManager and Memory Usage (From: Andrew Lindesay <email@hidden>)

  • Prev by Date: Re: Wolips
  • Next by Date: Re: WOResourceManager and Memory Usage
  • Previous by thread: WOResourceManager and Memory Usage
  • Next by thread: Re: WOResourceManager and Memory Usage
  • Index(es):
    • Date
    • Thread