<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cached(func):
 """ Cache decorator for a function without keyword arguments You can access the cache contents using the ``cache`` attribute in the resulting function, which is a dictionary mapping the arguments tuple to the previously returned function result. """

  class Cache(dict):
    def __missing__(self, key):
      result = self[key] = func(*key)
      return result
  cache = Cache()
  f = wraps(func)(lambda *key: cache[key])
  f.cache = cache
  return f