The horizon.utils.memoized ModuleΒΆ

horizon.utils.memoized.memoized(func)[source]

Decorator that caches function calls.

Caches the decorated function’s return value the first time it is called with the given arguments. If called later with the same arguments, the cached value is returned instead of calling the decorated function again.

The cache uses weak references to the passed arguments, so it doesn’t keep them alive in memory forever.

Previous topic

The horizon.workflows Module

Next topic

The horizon.utils.filters Module

This Page