SPPCompiler.Utils.FunctionCache module

This module provides a modified version of functools.cache and functools.cache_property. It allows for the tracking of all functions decorated wth these 2 decorators, such that the caches can all be cleared from one point in the program. A registry is used to track all caches.

class SPPCompiler.Utils.FunctionCache.FunctionCache

Bases: object

A class that provides a cache for functions and properties.

static cache(function)
Return type:

Callable[..., TypeVar(T)]

static cache_property(function)
Return type:

cached_property

static clear_all_caches()

Clear all caches.

Return type:

None