For caching, enable mod_expires and use the following config:
ExpiresActive On
ExpiresByType image/gif "access plus 1 week"
ExpiresByType image/png "access plus 1 week"
ExpiresByType image/jpg "access plus 1 week"
ExpiresByType image/jpeg "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"
ExpiresByType application/x-shockwave-flash "access plus 1 week"
ExpiresByType text/html "access plus 1 hour"
ExpiresByType text/css "access plus 1 day"
ExpiresByType text/javascript "access plus 1 day"
This will cache even PHP pages. So add the following before session_start:
session_cache_limiter("nocache")
This way authenticated users (who are presumably using the dynamic features) are not cached, but others are. CSS and images are still cached for everyone, of course. One limitation is that if a user changes from logged off to logged in, and he keeps visiting the same pages that he had seen before when he had not yet logged in, he will still see the logged off version.
For compression, this can be enabled for specific types like this:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
(and enable mod_deflate)
There is a sample config on http://httpd.apache.org/docs/2.0/mod/mod_deflate.html that shows how to enable it in general and limit it for specific browsers.