def set_memcache_policy(self, func):
if func is None:<EOL><INDENT>func = self.default_memcache_policy<EOL><DEDENT>elif isinstance(func, bool):<EOL><INDENT>func = lambda unused_key, flag=func: flag<EOL><DEDENT>self._memcache_policy = func<EOL>
Set the memcache policy function.

        Args:
          func: A function that accepts a Key instance as argument and returns
            a bool indicating if it should be cached.  May be None.