<PackageReference Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.85.1" />

Microsoft.Identity.Client.Extensions.Msal.Storage

public class Storage
Wrapper over persistence layer. Does not use cross-process locking. To add cross-process locking, wrap calls with CrossPlatLock
public static Storage Create(StorageCreationProperties creationProperties, TraceSource logger = null)

Initializes a new instance of the Storage class. The actual cache reading and writing is OS specific: WindowsDPAPI encrypted file on behalf of the user. MacCache is stored in KeyChain. LinuxCache is stored in Gnome KeyRing - https://developer.gnome.org/libsecret/0.18/

public void Clear(bool ignoreExceptions = false)

Delete cache file

public byte[] ReadData()

Read and unprotect cache data

public void VerifyPersistence()

Tries to write -> read -> clear a secret from the underlying persistence mechanism

public void WriteData(byte[] data)

Protect and write cache data to file. It overrides existing data.