[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] RFC: CGI::Application::Plugin::CAPTCHA


Bruce McKenzie wrote:
> This really has nothing to do with CAPTCHA but
> 
> Clint Moore wrote:
> 
>> >     I think Cache::FileCache would both of these problems.  You can 
>> set many options from new() including an expire time.  With that you 
>> could store whatever information you wanted in one place.  I'm using 
>> it at the moment to store large pages in a database front end that I 
>> maintain to cut down on the amount of selects that I do.  It lets me 
>> store arbitrary information in a single place just by checking 
>> $cache_filecache->get() can get what I want, and if not, regenerating 
>> it.
>>
>>     Now, granted, this application is pretty small and hardly ever 
>> has any more then about ten people using it at the same time so I 
>> haven't had to worry about performance.  There is Cache::Memcached 
>> that uses the same api in case you need the benefits of a memory 
>> based cache setup.
>>
> A huffy note from our hosting company about the amount of resources
> consumed by one of my cgi apps makes me think I should be using
> Cache::Cache or something similar. Only a couple of us here run the app
> in question, but I had it set to refresh every five minute.
> 
> The app basically runs a bunch of regular expressions on a big log file
> and prints out a summary of who's in the log, every time it's called.
> Few lines are added to the log between calls. Often, there is no change.
> 
> The dox for Cache::Cache assume that the reader has a clue about using
> caches in general. I don't. Can someone point me to a tutorial, book or
> cookbook chapter where I can get a clue without having to work too hard :-)

Caching is basically just storing information that just needs to be
calculated once but potentially used over and over. It usually resembles
a hash with keys and values. The keys usually represent the arguments
used in the calculation and the values are the cached results.

My collegue, Perrin Harkins, has done quite a lot of work and
comparisons of the various Perl cacheing options and I have to say that
Cache::Cache is his least favorite. It's pretty slow. He usually
recommends the following:

Cache::Memcached - it's the fastest but does require another daemon
(memcached) to be running.

MySQL - For simple primary key (unique hash key) look ups it's extremely
fast, but again it requires an external program, although it's more
common than memcached.

BerkeleyDB - No external daemon  need and still almost as fast as the
other 2 (look at BerkeleyDB and BerkeleyDB::Lite)

-- 
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.