filesystem cache VS Mysql cache

filesystem cache VS Mysql cache

Posted by: davide.pozza
Posted on: 2008-11-19 06:10:00

Hi all!
I've to develop a custom php caching module for a website having a lot of contents (the full cache could reach about 500.000 items). Is it better to save my cached data directly on the filesystem or to save them on a DB table? In the first case for each request I've only to read and return a file (but I'all have a directory containing 500.000 files!), in the second I have to perform a query on a sigle table (with 500.000 entries indexed by using the "URL" field).
Which is, in your opinion, the best solution in terms of performances?
Thanks in advance!



Re: filesystem cache VS Mysql cache

Posted by: sXi
Posted on: 2008-11-19 14:02:00

There's an upper limit on files. I don't know the precise figure, but I'd suggest you contact Support and query them regarding a figure of 500k on a single account. If the number poses no problems, then the file system cache would be the way to go.

I recall someone (Scott?) mentioning they were approaching the half million mark recently.




How To Install PHP.INI / ionCube on DreamHost

Tags: db tablebest solutionthanks in advance