| Conditions | 2 |
| Total Lines | 11 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package infrastructures |
||
| 10 | func CreateRistrettoCache() error { |
||
| 11 | var err error |
||
| 12 | if cache, err = ristretto.NewCache(&ristretto.Config{ |
||
| 13 | NumCounters: config.RistrettoNumCounters, // number of keys to track frequency of (10M). |
||
| 14 | MaxCost: config.RistrettoMaxCost, // maximum cost of cache (1GB). |
||
| 15 | BufferItems: config.RistrettoBufferItems, // number of keys per Get buffer. |
||
| 16 | }); err != nil { |
||
| 17 | return err |
||
| 18 | } |
||
| 19 | |||
| 20 | return nil |
||
| 21 | } |
||
| 26 |