If you have static pages or unchanging files on your server that are compressible, it is a good idea to compress them to save bandwidth.
However, when you enable mod_gzip or mod_deflate, will the result of the compression be cached in RAM so the data won't be redundantly re-compressed each time it is requested?
If not, is there a way to achieve that? Once a file or static page is compressed, it is stored in a RAM buffer and if the time stamp of the original file does not change, the cached compressed version is served directly?
You can use the content negotiation option of Apache to do this. There is a somewhat dated discussion about this at [webmasterworld.com...] which covers both the techniques and performance part. Please remember that the thread is some years old and both hardware and software techniques may have improved over time.