On 12/05/11 17:10, Le Trung Kien wrote:
I realized that the server reply both 403 and 404. About 404, but I don't know how to cache 404 File Not Found reply from original servers, should I add a default error page on web application for invalid URLs ? I tested and saw that cache misses on those URLs because we don't have a default error page now : 404 TCP_MISS:FIRST_UP_PARENT Kien Le
Default page or not, Squid does not mind. All it needs is an Expires: header at least a few seconds in the future.
Personally, I use a script which detects and sets teh header if its an unknown URL (5 seconds caching, the client could be about to create it) or one of the permanently dead ones (1 year caching with sometimes info saying where the new one is).
How you do it depends on the server capabilities and website needs. Amos -- Please be using Current Stable Squid 2.7.STABLE9 or 3.1.12 Beta testers wanted for 3.2.0.7 and 3.1.12.1