Conditions | 2 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package infrastructures |
||
29 | func (c *CacheSingleton) CreateRistrettoCache() error { |
||
30 | var err error |
||
31 | if c.cache, err = ristretto.NewCache(&ristretto.Config{ |
||
32 | NumCounters: config.RistrettoNumCounters, // number of keys to track frequency of (10M). |
||
33 | MaxCost: config.RistrettoMaxCost, // maximum cost of cache (1GB). |
||
34 | BufferItems: config.RistrettoBufferItems, // number of keys per Get buffer. |
||
35 | }); err != nil { |
||
36 | return err |
||
37 | } |
||
38 | |||
39 | return nil |
||
40 | } |
||
51 |