Compress cache key.