def test_cache_evictionPolicy(self):
        """Test that the correct item is evicted according to the cache's policy."""
        for cache_type, cache in self.caches.items():
            with self.subTest(cache_type=cache_type):
                cache.set('key1', 'value1')
                cache.set('key2', 'value2')
                # Access key1 again to ensure we evict 'key2'
                cache.get('key1')
                cache.set('key3', 'value3')
                self.assertFalse('key2' in cache, f"{cache_type} cache did not evict the least used item.")
                self.assertTrue('key1' in cache and 'key3' in cache,
                                f"{cache_type} cache eviction did not work as expected.")
Test that the correct item is evicted according to the cache's policy.
tests/integ_tests/core/inference/test_cache.py