docstr: Test MessageCache's storeCachedForwardMessagesInMemory config option logic
docstr_tok: ["Test","MessageCache","'s","storeCachedForwardMessagesInMemory","config","option","logic"]
code: def test_store_in_memory_config_option(self):
      """Test MessageCache's storeCachedForwardMessagesInMemory config option logic"""
      cache = ForwardMsgCache()
      session = _create_mock_session()
      run_count = 0
  
      msg = create_dataframe_msg([1, 2, 3, 4, 5])
      msg_hash = populate_hash_if_needed(msg)
  
      cache.add_message(msg, session, run_count)
  
      run_count += 1
      # Cache should still count message references for messages.
      self.assertTrue(
          cache.has_message_reference(msg, session, run_count)
      )
  
      message_content = cache.get_message(msg_hash)
  
      # Cache should not store message content for messages.
      self.assertEqual(message_content, None)
  
imports: import unittest
  from unittest.mock import MagicMock
  from streamlit import config
  from streamlit.runtime import app_session
  from streamlit.runtime.forward_msg_cache import ForwardMsgCache, create_reference_msg, populate_hash_if_needed
  from streamlit.runtime.stats import CacheStat
  from streamlit.testing.v1.util import patch_config_options
  from tests.streamlit.message_mocks import create_dataframe_msg
label_desc: Use image node_id 9 for calling the ForwardMsgCacheTest obj's underlying member method code with example usage: obj.test_store_in_memory_config_option() without return types