cached(function) - cache function