def __call__(self, func):
    decorator = lru_cache(maxsize=self._maxsize, typed=self._typed)
    wrapped = decorator(func)
    on_transaction_end(self._session)(wrapped.cache_clear)
    return wrapped
def __call__(self, func):
    decorator = lru_cache(maxsize=self._maxsize, typed=self._typed)
    wrapped = decorator(func)
    on_transaction_end(self._session)(wrapped.cache_clear)
    return wrapped