Developing a web based image browser - How to cache?
-
Hi there. I am working on an application that shall be used as a local frontend to an online image database. The application shall display a list of images matching specific criteria as thumbnails and, upon click, will show the images in full size. The server has a list of newly added content which shall be presented to the user on startup, ideally showing every new content since the last synchronisation. The problem is that a rather "small" number of images (~30 that is) will eat up several megs of disk space (~10 MB). I don't want to rely on the users having a broadband connection and also can't afford to let my application eat hunderts of megs of disk space, so apparently there is a need of some clever caching behaviour. Now I have never done this before and don't even know how a regular web browser handles caching, so I need some information to get me started or even better, some ideas on how to solve this. If it matters, I am working on .NET with C# since I hope that this will give me the possibility to port the project later to tge Mono platform. Any help would be appreciated!
Regards, Markus
-
Hi there. I am working on an application that shall be used as a local frontend to an online image database. The application shall display a list of images matching specific criteria as thumbnails and, upon click, will show the images in full size. The server has a list of newly added content which shall be presented to the user on startup, ideally showing every new content since the last synchronisation. The problem is that a rather "small" number of images (~30 that is) will eat up several megs of disk space (~10 MB). I don't want to rely on the users having a broadband connection and also can't afford to let my application eat hunderts of megs of disk space, so apparently there is a need of some clever caching behaviour. Now I have never done this before and don't even know how a regular web browser handles caching, so I need some information to get me started or even better, some ideas on how to solve this. If it matters, I am working on .NET with C# since I hope that this will give me the possibility to port the project later to tge Mono platform. Any help would be appreciated!
Regards, Markus
From what I understand you will create a website showing a gallery of images. You will also create a Windows application that will access this website and show the images as thumbnails and full-size. If this is the case then there is no way around the connection speed problem - while thumbnails will be small (a few KB each) the full-size images will always be large and no amount of caching can solve this. A web browser caches things by simply storing them on disk. If it hasn't been used in a certain amount of time it is then deleted.
-
From what I understand you will create a website showing a gallery of images. You will also create a Windows application that will access this website and show the images as thumbnails and full-size. If this is the case then there is no way around the connection speed problem - while thumbnails will be small (a few KB each) the full-size images will always be large and no amount of caching can solve this. A web browser caches things by simply storing them on disk. If it hasn't been used in a certain amount of time it is then deleted.
Guess that question is answered. I thought caching would be somewhat more sophisticated ... well, it was early that day ... and the lack of coffee ... you know. :doh: From what I've seen so far, there are two major caching solutions for .NET; The ASP Cache and the Caching Application Block. What I need is a cache that is persistent over application restarts (basically the ASP cache isn't, but I think this could be easily implemented) and configurable during runtime - but I have seen no possibility to restrict the memory used on either one. Any idea how this is done or could be done? Or is there any other cache implementation that features this already? Thanks so far! -- modified at 11:42 Thursday 19th July, 2007
Regards, Markus