North American Network Operators Group|
Date Prev | Date Next | Date Index | Thread Index | Author Index | Historical
Re: decreased caching efficiency?
On Sat, 21 Oct 2000, Adrian Chadd wrote: > > But there is no file to cache? I don't have enough gear to set up a test with squid myself > > (and that would only be one cache) but how is the engine to know to cache it? > > My understanding is that CGI-generated content is usually not cached. > > BZZT. Another assumption which is actually totally not true. > For example, imagine your photo book. The photos won't change, right ? > The position in your database won't change, right ? So .. > > http://www.domain.com/photos?id=31765 > > ok. 31765 is a static image that won't change. So, you'd be better off > setting its expiry time to something high, wouldn't you? I think the problem with caches and proxies is that the occasions where they offer you an object out of the cache when you wish they didn't are much more noticable then when everything's the way it should. Authors of CGI programs have coughed up many a skull because some cache somewhere was making them think there was a bug somewhere in their scriptery while it was in fact their browser/vendorproxy smoking crack. I seem to recall certain versions of IE, for example, who seem to automatically assume that the contents served by http://www.domain.com/rolldice.cgi?bet=30 will not change the second time you request the page, at least some of the times. I can imagine that this irritates these webdevelopers so much that they have grown a solid loathing for anything that tries to interfere with the traffic between their scriptics and the browser. Personally, I think that if you have a CGI that offers the same result on the same query every single time and has a limited dataset (like in the example of a photo album) you may be much better off to move towards a solution on top of the regular filesystem. So instead of going to http://www.isp.com/photogallery.cgi?person=pi&index=1 You go to http://www.isp.com/photogallery/pi/1 This saves you precious fork()s and allows for all the spiffy performance tweaks in both the OS and the webserver to optimize throughput without hogging your CPU with Wallware on every request. The toughest thing to learn about programming is when not to do it, I guess:). > You can't. End of story. This is the internet, people control their end-nodes, > so you have zero chance of this happening. If you *REALLY* want to be evil, > you wrap the images in a java applet so they can't just rightclick on it, > but again that won't stop the smart people. I propose we shoot them. Pi -- A mouse is a device used to focus xterms.