but I could receive any version of my perl at any time.
I guess you mean that at your browser you receive the output produced when your server runs your Perl scripts. If I have guessed wrong then what follows probably isn't relevant.
If you sometimes receive old content after having received new content then it isn't a simple caching problem.
Do you have a pool of caching proxy servers between your browser and server? If so, each proxy server might have cached a different version of response and, depending on which server the load balancer sends your latest request to, you might get various ages of responses somewhat randomly. Controlling expiry will solve this problem if the proxy servers are well behaved. In development I would bypass all proxy servers and query the source server directly, if at all possible, until I was sure the server was stable and correct, then test through the proxy servers to ensure that caching wasn't causing a problem.
If there are proxy servers between browser and origin server, can you inspect their logs to find out what requests they receive and what they do to respond to them?
this is a server problem not a client problem, right?
When you receive old content at your browser, does your server access log show that the request made it all the way to the server? Your content may be delivered in parts through several requests: a main document and many linked documents (images, css, javascript, etc.). If content is not being served from a cache then you should see a record of each part being accessed in your server's access log.
Setting the cache expiry on the document produced by your Perl script will not affect caching of other linked documents.
If you are going to control caching, it would be better to put the controls in the HTTP headers rather than in the HTML. You can't add meta tags to images, as far as I know, and I suspect not in your javascript either (though I could be wrong about the latter). There is a nice tutorial at http://www.mnot.net/cache_docs/ that explains some of the options and issues.
You may find the apache mod_expires module helpful for adding HTTP headers related to caching: http://httpd.apache.org/docs/2.0/mod/mod_expires.html
In reply to Re: apache/perl caching problem
by ig
in thread apache/perl caching problem
by ksublondie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |