Re: Images in MySQL vs directory/file?

From: Date: Wed, 10 Dec 2003 22:43:17 +0000
Subject: Re: Images in MySQL vs directory/file?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-172399@lists.php.net to get a copy of this message
Gerard Samuel wrote:
On Wednesday 10 December 2003 02:43 pm, Galen wrote:
If you store images that are played with a lot on the disk, it'll likely be slower than MySQL due to MySQL having better caching.
I disagree. Depending on your setup, when a file based image is downloaded to a user's computer, its cached there. No need to fetch it again, till it expires. I don't think thats possible via images from a database, but I may be wrong. Feel free to correct me...
Images are cached client side just as html pages are. Scripts are no exception. A script which outputs an image will have the same URI over and over, so it will be cached. If the browser isn't cacheing as you want, you can always send a header telling the browser to cache it. -- paperCrane <Justin Patrin>

« previous php.general (#172399) next »