def _use_cache(self, key, options=None):
flag = ContextOptions.use_cache(options)<EOL>if flag is None:<EOL><INDENT>flag = self._cache_policy(key)<EOL><DEDENT>if flag is None:<EOL><INDENT>flag = ContextOptions.use_cache(self._conn.config)<EOL><DEDENT>if flag is None:<EOL><INDENT>flag = True<EOL><DEDENT>return flag<EOL>
Return whether to use the context cache for this key.

        Args:
          key: Key instance.
          options: ContextOptions instance, or None.

        Returns:
          True if the key should be cached, False otherwise.