def test_function_caching(self, mock_create):
        """Test that cached function calls return the same result and avoid re-execution."""
        ctx = create_mock_ctx()
        store_instance = mock_create.return_value
        store_instance.get.return_value = None  # Simulate cache miss

        result1 = example_function(ctx, 1, 2)
        store_instance.get.return_value = result1  # Simulate cache hit
        result2 = example_function(ctx, 1, 2)

        self.assertEqual(result1, result2)
        self.assertEqual(result1, 3)
        store_instance.set_cache.assert_called_once_with(
            _build_cache_key([1, 2]), result1, ttl=60
        )
Test that cached function calls return the same result and avoid re-execution.
tests/unittests/execution_cache/decorator_tests.py