httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: shared objects across handlers
Date Wed, 04 Aug 2004 19:53:41 GMT
Brian <brian@photoresearchers.com> writes:

> Quick question: is the initialization of new Apache::Request or
> Apache::Cookie objects (parsing, etc.) expensive (or alternatively,
> cached)
  ^^^^^^

Their C counterparts (which do the actual parsing) are cached, and 
converting those to perl objects should be cheap enough that you
shouldn't need to cache them yourself.

> In other words, if you have multiple handlers operating on a given
> request that use cookie or query parameters, is it better to create a
> new object within each handler or to create it once and attempt to

[...]

Just create a new object within each handler.  It'll always 
use the cached parse data.

-- 
Joe Schaefer


Mime
View raw message