docstr: Clear cache should do its thing.
docstr_tok: ["Clear","cache","should","do","its","thing","."]
code: def test_clear_cache(self):
      """Clear cache should do its thing."""
      foo_vals = []
  
      @st.cache
      def foo(x):
          foo_vals.append(x)
          return x
  
      bar_vals = []
  
      @st.cache
      def bar(x):
          bar_vals.append(x)
          return x
  
      foo(0), foo(1), foo(2)
      bar(0), bar(1), bar(2)
      self.assertEqual([0, 1, 2], foo_vals)
      self.assertEqual([0, 1, 2], bar_vals)
  
      # Clear the cache and access our original values again. They
      # should be recomputed.
      caching.clear_cache()
  
      foo(0), foo(1), foo(2)
      bar(0), bar(1), bar(2)
      self.assertEqual([0, 1, 2, 0, 1, 2], foo_vals)
      self.assertEqual([0, 1, 2, 0, 1, 2], bar_vals)
  
imports: import threading
  import types
  from unittest.mock import Mock, patch
  from parameterized import parameterized
  import streamlit
  from streamlit.elements import exception
  from streamlit.proto.Exception_pb2 import Exception
  from streamlit.runtime.legacy_caching import caching, hashing
  from tests import testutil
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 12 for calling the CacheTest obj's underlying member method code with example usage: obj.test_clear_cache() and returns: x, x