Skip to main content
.NET API Catalog
  • Browse
  • Search
  • Diff
  • Others
    Feature Usage Stats Top APIs
    Version Source
  1. Catalog
  2. System.Runtime.Caching
  3. MemoryCache
  4. Trim(Int32)
  • MemoryCache
    • MemoryCache(String, NameValueCollection)
    • MemoryCache(String, NameValueCollection, Boolean)
    • CacheMemoryLimit
    • Default
    • DefaultCacheCapabilities
    • Name
    • PhysicalMemoryLimit
    • PollingInterval
    • this[String]
    • Add(CacheItem, CacheItemPolicy)
    • AddOrGetExisting(CacheItem, CacheItemPolicy)
    • AddOrGetExisting(String, Object, CacheItemPolicy, String)
    • AddOrGetExisting(String, Object, DateTimeOffset, String)
    • Contains(String, String)
    • CreateCacheEntryChangeMonitor(IEnumerable<String>, String)
    • Dispose()
    • Get(String, String)
    • GetCacheItem(String, String)
    • GetCount(String)
    • GetEnumerator()
    • GetLastSize(String)
    • GetValues(IEnumerable<String>, String)
    • Remove(String, String)
    • Remove(String, CacheEntryRemovedReason, String)
    • Set(CacheItem, CacheItemPolicy)
    • Set(String, Object, CacheItemPolicy, String)
    • Set(String, Object, DateTimeOffset, String)
    • Trim(Int32)
net10.0
namespace System.Runtime.Caching
{
    [DefaultMember("Item")]
    public class MemoryCache : ObjectCache, IEnumerable, IDisposable
    {
        public long Trim(int percent);
    }
}
nuget.org
0.0 %
Reference this API
.NET
8.09.010.0
.NET Framework
4.04.54.5.14.5.24.64.6.14.6.24.74.7.14.7.24.84.8.1
Information specific to net10.0
Assembly

System.Runtime.Caching , Version=10.0.0.1, PublicKeyToken=b03f5f7f11d50a3a

Referencing

Your project needs a package reference to System.Runtime.Caching.

Package System.Runtime.Caching (10.0.1) net10.0
Platform Restrictions

This API is supported on any platform except for these:

  • wasi
  • Built-in API
  • Package-provided API
Search

01/11/2026
An error has occurred. This application may no longer respond until reloaded. Reload 🗙