Enable Gzip compression and set Cache expire times in CakePHP

I am using CakePHP with Apache2. Analyzing my pages with the tool PageSpeed from Google, I find two main problems. The first is that I should enable gzipping of content, the second that I should leverage browser caching for images, javascript and css files.

I have more or less found how to remedy this, but it involves changing my main .htaccess file. This doesn't look really the CakePHP way,