NewCompressionCache 创建压缩缓存
(maxSize int)
| 598 | |
| 599 | // NewCompressionCache 创建压缩缓存 |
| 600 | func NewCompressionCache(maxSize int) *CompressionCache { |
| 601 | return &CompressionCache{ |
| 602 | cache: make(map[string]*CompressResult), |
| 603 | maxSize: maxSize, |
| 604 | } |
| 605 | } |
| 606 | |
| 607 | // Get 获取缓存 |
| 608 | func (c *CompressionCache) Get(key string) *CompressResult { |
no outgoing calls