[Catalyst] Serving "static" content from DB

Cosimo Streppone cosimo at streppone.it
Sun Jun 7 18:43:41 GMT 2009


Mihai Bazon <mihai at bazon.net> wrote:

> I wrote some tests, since you ask me about numbers.  You can download it
> here to run it yourself:
>
>     http://mihai.bazon.net/Static-VS-DBI.tar.bz2

Excellent! Thanks for this.
Will look into it.

>  1. is the file cached?
>     - If not, retrieve from DB then save it on disk.
>     - If yes, is its mtime older than what's in DB?

> [...]

> For most requests, the Perl handler steps in only to check
> that the cached file is up-to-date.

So this is the critical step. The one that will
force you to hit the db for every static file request.

Again, if it's fine for you, everyone's happy.
And probably that db table will be mostly read-only and
cached in memory...

> Moreover, the cache is outside the
> document_root, which is many times convenient.

I don't know what you mean here. Can you explain me?

-- 
Cosimo



More information about the Catalyst mailing list