Hi,

I know that this has been covered here quite a bit, but I'm having trouble getting squid to cache a dynamiacally generated page. The idea is to limit the number of times a dynamically generated page gets regenerated.

I have a test page generated by this CGI:

---------------------------------------------------------
#!/bin/sh

DATE=`/bin/date`
set -f

echo Content-type: text/plain
echo "Last-modified: Wed, 20 Oct 2004 11:37:46 AM EDT"
echo "Expires: Wed, 27 Oct 2004 16:37:46 GMT"
echo
echo
echo CGI test script
echo $DATE
echo $DATE >> /tmp/testSquidRefresh.out
---------------------------------------------------------

If I tail the /tmp/testSquidRefresh.out, I can see that every time the page is refreshed, the cgi is executing. The squid access.log says:
TCP_REFRESH_HIT/304, which doesn't do what I want, because it has to execute the script to get the header.


The issue seems to be that the object was in the cache, but STALE. Why should it be stale, if the Expires header says it does not expire for a week?

Thanks in advance for answering my novice questions.

Regards,
JIM

Reply via email to