Add compress function to cache