# module `concrete.compiler.key_set_cache` KeySetCache. Cache for keys to avoid generating similar keys multiple times. --- ## class `KeySetCache` KeySetCache is a cache for KeySet to avoid generating similar keys multiple times. Keys get cached and can be later used instead of generating a new keyset which can take a lot of time. ### method `__init__` ```python __init__(keyset_cache: KeySetCache) ``` Wrap the native Cpp object. **Args:** - `keyset_cache` (_KeySetCache): object to wrap **Raises:** - `TypeError`: if keyset_cache is not of type _KeySetCache --- ### method `new` ```python new(cache_path: str) → KeySetCache ``` Build a KeySetCache located at cache_path. **Args:** - `cache_path` (str): path to the cache **Raises:** - `TypeError`: if the path is not of type str. **Returns:** KeySetCache