<PackageReference Include="System.ClientModel" Version="1.5.1" />

ClientCache

public class ClientCache
A cache for storing client instances, ensuring efficient reuse. Implements an LRU eviction policy.
public ClientCache(int maxSize)

Initializes the ClientCache with a configurable cache size.

public T GetClient<T>(object clientId, Func<T> createClient)

Retrieves a client from the cache or creates a new one if it doesn't exist. Updates the last-used timestamp on every hit.