Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lyallex,
On 6/10/2009 9:41 AM, Lyallex wrote:
Fetching images from the database every time results in a clunky page
load so I want to cache the images to disk
the first time an item is accessed my cache manager checks the disk
cache to see if images for that item are available.
If not it loads them onto the disk.
I'm interested: what db are you using, what is your network topology,
and what kind of performance increase are you observing?
Also, what code are you using to serve the bytes of the locally-cached
files? DefaultServlet?
I can't use symbolic links to place the imagecache outside the
application space because I develop on Windows and deploy to Linux
(historical, nothing I can do about it)
This shouldn't matter: you should be able to write files anywhere you
please. You don't have to be restricted to the deployment directory.
What about writing to C:\imagecache or ~/imagecache?
And what about storing your images entirely outside of the db, as simple
files, and only keeping a link in the db ?
That would allow *any* cache mechanism to work in a much simpler fashion
(including the browser's), and would probably immensely unload your db
software, which right now has to handle big "blob" data in each record.
It would also allow asynchronous mechanisms (like sendfile) to handle
the sending of these images much more efficiently.
Not even considering the time you'd gain in db maintenance operations.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org