// Copyright © 2023 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System.Collections.Generic; namespace CefSharp.Internals { /// /// Render Process JavaScript Binding (JSB) object cache /// Legacy Behaviour, objects are cache per process. /// public class LegacyJavaScriptObjectCache : IJavaScriptObjectCache { private readonly Dictionary cache = new Dictionary(); /// public void ClearCache(int browserId) { // NO OP } /// public void InsertOrUpdate(int browserId, IList javascriptObjects) { foreach (var obj in javascriptObjects) { cache[obj.Name] = obj; } } /// public ICollection GetCacheValues(int browserId) { return cache.Values; } /// public Dictionary GetCache(int browserId) { return cache; } } }