def set_memcache_timeout_policy(self, func):
if func is None:<EOL><INDENT>func = self.default_memcache_timeout_policy<EOL><DEDENT>elif isinstance(func, int):<EOL><INDENT>func = lambda unused_key, flag=func: flag<EOL><DEDENT>self._memcache_timeout_policy = func<EOL>
Set the policy function for memcache timeout (expiration).

        Args:
          func: A function that accepts a key instance as argument and returns
            an integer indicating the desired memcache timeout.  May be None.

        If the function returns 0 it implies the default timeout.