[Dbix-class] DBIx::Class and caching

Tobias Kremer list at funkreich.de
Thu Jul 3 13:46:53 BST 2008


Quoting Oleg Pronin <syber.rus at gmail.com>:
> Of course when your project is not popular or you never run benchmark on
> what you write, you have no matter.

This all depends on what you're caching. If your query runs for 0.001 seconds
there maybe is no need to cache it and doing so might indeed have a negative
impact on the overall performance. But if you generate lists that don't need to
be up-to-date with queries that run 1-2 seconds I'm pretty sure that
DBIC::Cursor::Cached WILL get you a performance boost no matter what! We
haven't seen a worrying drop in performance since using it.

> I have 5-7mln page hits per day. When i tried to use DBIC::Cursor::Cached,
> users were about to blow the server up.

Hits are not representative to boast with the performance of your Catalyst
application (http://en.wikipedia.org/wiki/Page_view). What percentage of those
hits are static files like images, css, js, etc which you shouldn't be serving
through catalyst anyway? 80%?

--Tobias



More information about the DBIx-Class mailing list