(cache proxycore.PreparedCache)
| 979 | } |
| 980 | |
| 981 | func getOrCreateDefaultPreparedCache(cache proxycore.PreparedCache) (proxycore.PreparedCache, error) { |
| 982 | if cache == nil { |
| 983 | return NewDefaultPreparedCache(1e8 / 256) // ~100MB with an average query size of 256 bytes |
| 984 | } |
| 985 | return cache, nil |
| 986 | } |
| 987 | |
| 988 | // NewDefaultPreparedCache creates a new default prepared cache capping the max item capacity to `size`. |
| 989 | func NewDefaultPreparedCache(size int) (proxycore.PreparedCache, error) { |
no test coverage detected