• 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: Understanding the PageCache Working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding the PageCache Working


  • Subject: Re: Understanding the PageCache Working
  • From: Kieran Kelleher <email@hidden>
  • Date: Fri, 25 Aug 2006 15:09:07 -0400

Typo, sorry ..... I meant to say "null", not "bull"

OK, scenario.........

// Object iVar
Object _myObject;

// Lazy initialized object, gets created, fetched, whatever and cached when the getter is accessed the first time
public Object myObject() {
if ( _myObject == null ) {
_myObject = ...... // Initialize the object here
}
}




// AppendToresponse
public void appendToResponse( WOResponse r, WOContext c ) {

	// Let the page get generated
	super.appendToResponse( r, c );

// Set myObject reference to null after page appendToResponse so it can be garbage collected
_myObject = null;
}


HTH,

Regards, Kieran


On Aug 25, 2006, at 2:11 PM, Ute Hoffmann wrote:

Hallo Kieran,
Thank you very much, this makes sense, just a dummy question:
How do I set a object to pull after append To Response is complete?

Regards,
Ute

Am Freitag, 25.08.06 um 18:46 Uhr schrieb Kieran Kelleher:

AFAIK, the page cache contains WOComponents and the template/wod. The final HTML is generated each time the response is generated. If you have memory expensive objects on a page, have them created via lazy initialization and set the object to bull AFTER append to response is complete. Then the memory expensive objects are no longer referred to by the page WOComponent instance in the page cache.

Does that make sense?

Regards, Kieran


On Aug 25, 2006, at 10:39 AM, Ute Hoffmann wrote:

Hallo,
just a question for clarification again. In my app there are some big pages (containing a lot of data and html). In the page cache, will there be only saved a reference and the template or will the html-page with complete content be saved or is it completely different?


Follow up: If a database fetch was for a page that is still in the pageCache of an application, is the ec of this database fetch eligible for garbage collection (if it holds only the data for this singe page) or will it stay around until the page it was originally used for is out of the pageCache?

Can someone give me some enlightenment here, please?

Thanks a lot!

Ute

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


This email sent to email@hidden



_______________________________________________ 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
  • Prev by Date: Re: Xcode 2.4 Deprecation Announcements
  • Next by Date: Re: Xcode 2.4 Deprecation Announcements
  • Previous by thread: Re: Understanding the PageCache Working
  • Next by thread: Re: Understanding the PageCache Working
  • Index(es):
    • Date
    • Thread