Re: [CDBI] Memcached

"Derek Watson" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
Comments are in-line, below

> >>>>> "Derek" == Derek Watson <[email protected]> writes:
>
> Derek> What is the best way to use Memcached with Class::DBI? Should I just
> Derek> override retrieve() and update()? I have reviewed Class::DBI::Sweet's
> Derek> code for implementing caching, but it doesn't seem very clean. .. is
> Derek> that just the nature of CDBI's framework or is there a better way?
>
> Derek> Please let me know if anyone else is using this type of functionality
> Derek> or if anyone is close enough to the internals to know the right
> Derek> approach for doing this sort of thing.

On 1/26/07, Randal L. Schwartz <[email protected]> wrote:
> I've tried to do this stuff, and gotten some degree of success,

Can you share your approach and experience? Did you overload
retrieve() and update()? Did it work as expected?

> but I believe it was Perrin who told me first that if you have to cache that much, you are
> probably going to get a better return by fixing the database or your queries
> instead.  Sorry if I ruined the quote too badly, Perrin.

A) Why would you assume that database optimization and object caching
are mutually exclusive? B) Why would you assume that my database has
the ability to outperform Memcached?

Memcached is a key component in making some of the web's most heavily
trafficked sites possibe: (http://www.danga.com/memcached/users.bml)
and it alarms me that I can't find anyone using it with CDBI.
Furthermore, it's sad that 2 pillars of the Perl community would
discourage it's usage.

Frankly -- should I be looking at a different object persistence
layer, or a different development environment?

Derek


>
> --
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
> <[email protected]> <URL:http://www.stonehenge.com/merlyn/>
> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
> See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.