cache_arguments

odl.util.utility.cache_arguments(function)[source]

Decorate function to cache the result with given arguments.

This is equivalent to functools.lru_cache with Python 3, and currently does nothing with Python 2 but this may change at some later point.

Parameters:
functioncallable

Function that should be wrapped.