NewLRUCacheFilter
Creates a new fastcheck.Filter using an LRU cache of type cache.Cache with a fixed size.
def NewLRUCacheFilter(
size: int,
scope: promutils.Scope
) - > *LRUCacheFilter, error
Create a new fastcheck.Filter using an LRU cache of type cache.Cache with a fixed size
Parameters
| Name | Type | Description |
|---|---|---|
| size | int | The maximum number of items the LRU cache can hold. |
| scope | promutils.Scope | The Prometheus scope for metrics reporting related to the filter. |
Returns
| Type | Description |
|---|---|
*LRUCacheFilter, error | A new LRUCacheFilter instance and an error if the cache cannot be created. |