code: def test_caching_flow(
      app_context: AppContext, cache: SupersetMetastoreCache
  ) -> None:
      assert cache.has(FIRST_KEY) is False
      assert cache.add(FIRST_KEY, FIRST_KEY_INITIAL_VALUE) is True
      assert cache.has(FIRST_KEY) is True
      cache.set(SECOND_KEY, SECOND_VALUE)
      assert cache.get(FIRST_KEY) == FIRST_KEY_INITIAL_VALUE
      assert cache.get(SECOND_KEY) == SECOND_VALUE
      assert cache.add(FIRST_KEY, FIRST_KEY_UPDATED_VALUE) is False
      assert cache.get(FIRST_KEY) == FIRST_KEY_INITIAL_VALUE
      assert cache.set(FIRST_KEY, FIRST_KEY_UPDATED_VALUE) == True
      assert cache.get(FIRST_KEY) == FIRST_KEY_UPDATED_VALUE
      cache.delete(FIRST_KEY)
      assert cache.has(FIRST_KEY) is False
      assert cache.get(FIRST_KEY) is None
      assert cache.has(SECOND_KEY)
      assert cache.get(SECOND_KEY) == SECOND_VALUE
  
file_path: superset/tests/integration_tests/extensions/metastore_cache_test.py
imports: from __future__ import annotations
  from contextlib import nullcontext
  from datetime import datetime, timedelta
  from typing import Any, TYPE_CHECKING
  from uuid import UUID
  import pytest
  from flask.ctx import AppContext
  from freezegun import freeze_time
  from superset.key_value.exceptions import KeyValueCodecEncodeException
  from superset.key_value.types import JsonKeyValueCodec, KeyValueCodec, PickleKeyValueCodec
label_desc: Use image node_id 2 for calling a global function with example usage: test_caching_flow(app_context, cache) without return types