Re: Memoize.pm and mod_perl

2003-07-15 Thread Stas Bekman
[EMAIL PROTECTED] wrote:
Has anyone used the Memoize module extensively in a mod_perl environment?
I am thinking of using it to cache queries from the database, particularly
for lookups (somthing like $obj-get_name_from_id()).
In many cases the data is static so I don't mind is staying over from one
request to the next but I wanted to primarily use to limit the number of
queries per http request.  To keep the cache from growing (the website
receives 20 hit/min on average w/ 20,000 users) I wanted to either
implement a LRU/Expiration cache.  The other alternative I was considering
was to use a cleanup handler after every request.
I would like to know any experiences/thoughts anyone has had of using
Memoize in a mod_perl environment.
Memoize should work just fine under mod_perl. If you need to reset the cache 
between requests you should call its flush_cache() function. refer to its 
manpage for more info.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Memoize.pm and mod_perl

2003-07-14 Thread sxm124
Has anyone used the Memoize module extensively in a mod_perl environment?  I am 
thinking of using it to cache queries from the database, particularly for lookups 
(somthing like $obj-get_name_from_id()).

In many cases the data is static so I don't mind is staying over from one request to 
the next but I wanted to primarily use to limit the number of queries per http 
request.  To keep the cache from growing (the website receives 20 hit/min on average 
w/ 20,000 users) I wanted to either implement a LRU/Expiration cache.  The other 
alternative I was considering was to use a cleanup handler after every request.

I would like to know any experiences/thoughts anyone has had of using Memoize in a 
mod_perl environment.

Sidharth.



Re: Memoize.pm and mod_perl

2003-07-14 Thread Perrin Harkins
On Mon, 2003-07-14 at 14:12, [EMAIL PROTECTED] wrote:
 Has anyone used the Memoize module extensively in a mod_perl environment?

I'd suggest you use Cache::FileCache, MLDBM::Sync, or Cache::Mmap
instead.  Memoize is cool, but unnecessary if you are planning ahead
like this.

- Perrin


Re: Memoize.pm and mod_perl

2003-07-14 Thread Bill Marrs
I don't know anything about Memoize, but perhap db-level caching would work 
for you?

If you user MySQL, Mysql 4.0.1 and beyond has Query Caching capabilities 
built into it.

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#Query_Cache

-=bill