in reply to HTTP headers and such like
Your Web server should be able to give you reasonable control over caching without writing everything in Perl. Search through its documentation and see what you find. You'll want to set headers like Cache-control and Expires.