I have doubts in how the cache system work...
# --------------------------------------------------------
# Retrieves a category name from an ID, and cache the results for
# quick lookups, but expire them in case we are under mod_perl.
#what this phrase means: "...but expire them in case we are under mod_perl"?
I'm asking that because every first time I lauch the application the procedure seems to find something into the $CATEGORY_NAME{$id} hash ... not performig the sql query and returning nothing. This happnes only the first time I lauch it either under mod_perl or not. Under mod_perl the problem appears randomly.
As I imagine, sounds like ĘTEGORY_NAME is not initialized.
I'll appreciate every comment from you,
cheers
lepo
Lepo - lepo@lepo.org
Code:
sub get_category_name { # --------------------------------------------------------
# Retrieves a category name from an ID, and cache the results for
# quick lookups, but expire them in case we are under mod_perl.
#
I'm asking that because every first time I lauch the application the procedure seems to find something into the $CATEGORY_NAME{$id} hash ... not performig the sql query and returning nothing. This happnes only the first time I lauch it either under mod_perl or not. Under mod_perl the problem appears randomly.
As I imagine, sounds like ĘTEGORY_NAME is not initialized.
I'll appreciate every comment from you,
cheers
lepo
Lepo - lepo@lepo.org