Thanks to the Johns for their responses, but I believe perhaps I was
unclear about my intent.
In validating my form input I look at my DB tables to see what types of
input they will accept (valid values, maxlength, NULL ok, etc). This
data is about the database, not the values coming in off the forms. It
will stay the same until I alter my tables, which I won't be doing very
often (in production at least :) ). So I'm looking to avoid gathering
this metadata via DB calls every time I need to validate a form by
instead using the cached metadata, stored somewhere by mod_perl. My
thought was to put it into it's own namespace and have it available
globally, loaded from one of my modules at startup.
Does anyone else understand what I'm trying to say? I apologize if I'm
not expressing myself in the right vernacular.
Thanks,
RJ Herrick
On Feb 4, 2006, at 12:25 AM, RJ Herrick wrote:
Hi all,
I'm starting to do a lot of form processing, and came across the
idea of caching table metadata while validating to avoid unnecessary
DB (MySQL) calls. I just realized that, with mod_perl, I could even
do this across requests- and since the data shouldn't be changing,
this seems like a good way to trade some memory for a boost in speed.
I'm still very much on the learning curve with mod_perl and wanted
to see if anyone out there was already doing this, and if so, any
suggestions / comments / advise they might have.
Thank you all in advance,
RJ Herrick
--
"A foolish consistency is the hobgoblin of little minds" -Ralph
Waldo Emerson
--
"A foolish consistency is the hobgoblin of little minds" -Ralph Waldo Emerson