colinmollenhour / Cm_Cache_Backend_Redis

A Zend_Cache backend for Redis with full support for tags (works great with Magento)
Other
389 stars 142 forks source link

Clarification for default value of compress_threshold #125

Closed adeelejaz closed 6 years ago

adeelejaz commented 6 years ago

Hi,

I have noticed that the default compress_threshold value is 20480 for Cache but the Sessions module has it set as 2048. Is this intentional? After switching to LZF, I'm noticing a spike in network usage so just trying to explore all options.

colinmollenhour commented 6 years ago

The ideal threshold would depend on your available RAM, the speed of your network, the available bandwidth of your network, your app, etc.. With LZF vs gzip you are trading space/bandwidth for CPU cycles. So the defaults are set just to be sane values and mostly based on my whims at the time. :)