xml-axkit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kip Hampton <khamp...@totalcinema.com>
Subject [RFC] Altering the Execution Order in AxKit.pm
Date Thu, 13 Mar 2003 21:53:30 GMT
Howdy AxDevers...

I think I've stumbled over a subtle logic flaw in AxKit.pm's 
main_handler method as it relates to Providers and caching. The 
"problem" lies in the fact that the Provider's process() method is 
called before determining whether or not the resource is cached.

The Provider's process() method is meant to indicate the Provider's 
intention and ability to get data for the current resource. That's fine 
and good, but for many non-file-based and/or dynamic Providers, 
process() needs to do *everything* required to serve the data in order 
to determine what to return (e,g. select from a DB-- return Declined if 
there's no data, run the app that generates the content-- return 
Declined if the app fails, or whatever).

In practice, this means that by having AxKit.pm's main_handler() call 
the Provider's process() before examining whether or not the resource is 
cached, the Providers will *still* have to hit the database, run the 
app, or whatever, even though the data for that resource may already be 
cached on the disk-- hence, the real benefit of caching is taken away 
from those Providers.

Not a hard fix, I think, but I wanted to invite discussion and check my 
blind spots before I whack into the main_handler() and friends.

Thoughts?

-kip


Mime
View raw message