Squid http accelerator support & Pragma: No-Cache header

In attempt to tune the performance of my PHPAlbum, I configured Squid in accelerator mode. Caching images through squid is much faster than the built-in caching feature, because of eliminating the overhead of starting the PHP interpretter for every picture. However, I need to be able to discern the dynamically generated pages from the more static images. It would be great if the PHP scripts inserted a No-Cache header in the truly dynamic HTTP replies.
My current and working solution is adding this to the Squid config file:

acl albumdyn urlpath_regex \?cmd\=album \?cmd\=setup
no_cache deny albumdyn