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


style="display:inline-block;width:468px;height:60px"
data-ad-client="ca-pub-8698264690166658"
data-ad-slot="4417389723">