lru_cache

from functools import lru_cache

@lru_cache
def some_func(a):
	pass
Bloody Batfish