in reply to Re^2: apache/perl caching problem
in thread apache/perl caching problem
Caching control in the HTTP headers controls what the clients (including intermediate proxy servers) do with the response and subsequent queries for the same URL. It doesn't matter whether the response came from a static HTML file or was produced by a script.
To be certain the responses are coming from your server, I would run a network sniffer on the server (e.g. wireshark) and observe the query and response.
After confirming the bad responses are coming from the server, I would investigate the server configuration. Given the unusual behavior, I would make no assumptions, so I would begin by determining what process is listening on the port that accepted the connection over which the request and bad response were exchanged. If this is an apache server process then the scope is narrowed, but perhaps there is some intervening software.
Is your script a standard CGI script? If it is, it will be read from disk and executed once for every request handled by the server. You might verify this by having your script log its start time, process ID, version and the full path and modification time of the file loaded. Log this every time your script handles a request. You can then correlate these logs with the requests to confirm that your script is running and producing the results you are seeing, and see exactly what is running each time. If you have plain CGI, you should see a different process ID each time and the version and modification times of your script should always be the latest. Your evidence suggests you will see something else. If you see the same process ID for several requests, then you should investigate what that process is, how it comes to be handling multiple CGI requests and how it is handling your script.
The mod_perl module was mentioned in a previous post. This and others can cause your script to be loaded and kept in memory, effectively becoming a subroutine that is executed over and over for each request, rather than running your script from disk for each request. This is caching of a different sort and seems a likely explanation for the behavior you have described. HTTP headers and meta tags in the produced HTML will not affect this sort of caching.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: apache/perl caching problem
by ksublondie (Friar) on May 01, 2010 at 16:43 UTC | |
by ig (Vicar) on May 02, 2010 at 19:28 UTC | |
by ksublondie (Friar) on May 03, 2010 at 19:49 UTC | |
by ig (Vicar) on May 03, 2010 at 21:12 UTC | |
by ksublondie (Friar) on May 04, 2010 at 18:37 UTC | |
|