diff --git a/aspnetcore/client-side/dotnet-interop.md b/aspnetcore/client-side/dotnet-interop.md index 7907c69075e6..7fd7c87e37d6 100644 --- a/aspnetcore/client-side/dotnet-interop.md +++ b/aspnetcore/client-side/dotnet-interop.md @@ -468,3 +468,6 @@ In the preceding example, the `{TARGET FRAMEWORK}` placeholder is the [target fr * [.NET WebAssembly runtime](https://github.com/dotnet/runtime/tree/main/src/mono/wasm) * [`dotnet.d.ts` file (.NET WebAssembly runtime configuration)](https://github.com/dotnet/runtime/blob/main/src/mono/browser/runtime/dotnet.d.ts) * [Use .NET from any JavaScript app in .NET 7](https://devblogs.microsoft.com/dotnet/use-net-7-from-any-javascript-app-in-net-7/) +* Including static assets from a Razor class library + * (Blazor documentation) + * (Razor Pages documentation) diff --git a/aspnetcore/fundamentals/app-state.md b/aspnetcore/fundamentals/app-state.md index 2f0ea7a1eb5c..3f61b9598741 100644 --- a/aspnetcore/fundamentals/app-state.md +++ b/aspnetcore/fundamentals/app-state.md @@ -85,7 +85,7 @@ Session state exhibits the following behaviors: The in-memory cache provider stores session data in the memory of the server where the app resides. In a server farm scenario: -* Use *sticky sessions* to tie each session to a specific app instance on an individual server. [Azure App Service](https://azure.microsoft.com/services/app-service/) uses [Application Request Routing (ARR)](/iis/extensions/planning-for-arr/using-the-application-request-routing-module) to enforce sticky sessions by default. However, sticky sessions can affect scalability and complicate web app updates. A better approach is to use a Redis or SQL Server distributed cache, which doesn't require sticky sessions. For more information, see . +* Use *sticky sessions* to tie each session to a specific app instance on an individual server. [Azure App Service](https://azure.microsoft.com/services/app-service/) uses [Application Request Routing (ARR)](/iis/extensions/planning-for-arr/using-the-application-request-routing-module) to enforce sticky sessions by default. However, sticky sessions can affect scalability and complicate web app updates. A better approach is to use a Redis, SQL Server, or Azure Postgres distributed cache, which doesn't require sticky sessions. For more information, see . * The session cookie is encrypted via . Data Protection must be properly configured to read session cookies on each machine. For more information, see and [Key storage providers](xref:security/data-protection/implementation/key-storage-providers). ### Configure session state @@ -372,7 +372,7 @@ Session state exhibits the following behaviors: The in-memory cache provider stores session data in the memory of the server where the app resides. In a server farm scenario: -* Use *sticky sessions* to tie each session to a specific app instance on an individual server. [Azure App Service](https://azure.microsoft.com/services/app-service/) uses [Application Request Routing (ARR)](/iis/extensions/planning-for-arr/using-the-application-request-routing-module) to enforce sticky sessions by default. However, sticky sessions can affect scalability and complicate web app updates. A better approach is to use a Redis or SQL Server distributed cache, which doesn't require sticky sessions. For more information, see . +* Use *sticky sessions* to tie each session to a specific app instance on an individual server. [Azure App Service](https://azure.microsoft.com/services/app-service/) uses [Application Request Routing (ARR)](/iis/extensions/planning-for-arr/using-the-application-request-routing-module) to enforce sticky sessions by default. However, sticky sessions can affect scalability and complicate web app updates. A better approach is to use a Redis, SQL Server, or Azure Postgres distributed cache, which doesn't require sticky sessions. For more information, see . * The session cookie is encrypted via . Data Protection must be properly configured to read session cookies on each machine. For more information, see and [Key storage providers](xref:security/data-protection/implementation/key-storage-providers). ### Configure session state diff --git a/aspnetcore/performance/caching/distributed.md b/aspnetcore/performance/caching/distributed.md index 71dffc0a5f76..455e9920ef79 100644 --- a/aspnetcore/performance/caching/distributed.md +++ b/aspnetcore/performance/caching/distributed.md @@ -27,7 +27,7 @@ When cached data is distributed, the data: * Survives server restarts and app deployments. * Doesn't use local memory. -Distributed cache configuration is implementation specific. This article describes how to configure SQL Server and Redis distributed caches. Third party implementations are also available, such as [NCache](http://www.alachisoft.com/ncache/aspnet-core-idistributedcache-ncache.html) ([NCache on GitHub](https://github.com/Alachisoft/NCache)). Regardless of which implementation is selected, the app interacts with the cache using the interface. +Distributed cache configuration is implementation specific. This article describes how to configure SQL Server, Redis, or Postgres distributed caches. Third party implementations are also available, such as [NCache](http://www.alachisoft.com/ncache/aspnet-core-idistributedcache-ncache.html) ([NCache on GitHub](https://github.com/Alachisoft/NCache)), Cosmos DB, and Postgres. Regardless of which implementation is selected, the app interacts with the cache using the interface. [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/performance/caching/distributed/samples/) ([how to download](xref:index#how-to-download-a-sample)) @@ -39,6 +39,8 @@ Add a package reference for the distributed cache provider used: * For a Redis distributed cache, [Microsoft.Extensions.Caching.StackExchangeRedis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis). * For SQL Server, [Microsoft.Extensions.Caching.SqlServer](https://www.nuget.org/packages/Microsoft.Extensions.Caching.SqlServer). +* For Postgres, [Microsoft.Extensions.Caching.Postgres](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Postgres). +* For Cosmos DB, [Microsoft.Extensions.Caching.Cosmos](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Cosmos). * For the NCache distributed cache, [NCache.Microsoft.Extensions.Caching.OpenSource](https://www.nuget.org/packages/NCache.Microsoft.Extensions.Caching.OpenSource). ## IDistributedCache interface @@ -57,8 +59,9 @@ Register an implementation of [!NOTE] > A (and optionally, and ) are typically stored outside of source control (for example, stored by the [Secret Manager](xref:security/app-secrets) or in `appsettings.json`/`appsettings.{Environment}.json` files). The connection string may contain credentials that should be kept out of source control systems. +### Distributed Postgres Cache + +[Azure Database for PostgreSQL](/azure/postgresql) can be used as a distributed cache backing store via the `IDistributedCache` interface. Azure Database for PostgreSQL is a fully managed, AI-ready Database-as-a-Service (DBaaS) offering built on the open-source PostgreSQL engine, designed to support mission-critical workloads with predictable performance, robust security, high availability, and seamless scalability. + +After installing the [Microsoft.Extensions.Caching.Postgres](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Postgres) NuGet package, configure your distributed cache as follows: + +1. Register the Service + +```csharp +using Microsoft.Extensions.DependencyInjection; + +var builder = WebApplication.CreateBuilder(args); + +// Register Postgres distributed cache +builder.Services.AddDistributedPostgresCache(options => { + options.ConnectionString = builder.Configuration.GetConnectionString("PostgresCache"); + options.SchemaName = builder.Configuration.GetValue("PostgresCache:SchemaName", "public"); + options.TableName = builder.Configuration.GetValue("PostgresCache:TableName", "cache"); + options.CreateIfNotExists = builder.Configuration.GetValue("PostgresCache:CreateIfNotExists", true); + options.UseWAL = builder.Configuration.GetValue("PostgresCache:UseWAL", false); + + // Optional: Configure expiration settings + + var expirationInterval = builder.Configuration.GetValue("PostgresCache:ExpiredItemsDeletionInterval"); + if (!string.IsNullOrEmpty(expirationInterval) && TimeSpan.TryParse(expirationInterval, out var interval)) { + options.ExpiredItemsDeletionInterval = interval; + } + + var slidingExpiration = builder.Configuration.GetValue("PostgresCache:DefaultSlidingExpiration"); + if (!string.IsNullOrEmpty(slidingExpiration) && TimeSpan.TryParse(slidingExpiration, out var sliding)) { + options.DefaultSlidingExpiration = sliding; + } +}); + +var app = builder.Build(); +``` + +2. Use the Cache + +```csharp +public class MyService { + private readonly IDistributedCache _cache; + + public MyService(IDistributedCache cache) { + _cache = cache; + } + + public async Task GetDataAsync(string key) { + var cachedData = await _cache.GetStringAsync(key); + + if (cachedData == null) { + // Fetch data from source + var data = await FetchDataFromSource(); + + // Cache the data with options + var options = new DistributedCacheEntryOptions { + AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(30), + SlidingExpiration = TimeSpan.FromMinutes(5) + }; + + await _cache.SetStringAsync(key, data, options); + return data; + } + + return cachedData; + } +} +``` + ### Distributed NCache Cache [NCache](https://github.com/Alachisoft/NCache) is an open source in-memory distributed cache developed natively in .NET. NCache works both locally and configured as a distributed cache cluster for an ASP.NET Core app running in Azure or on other hosting platforms. @@ -140,7 +212,7 @@ To configure NCache: [!code-csharp[](~/performance/caching/distributed/samples/6.x/DistCacheSample/Program.cs?name=snippet_AddNCache_Cache)] -### Distributed Azure CosmosDB Cache +### Distributed Azure Cosmos DB Cache [Azure Cosmos DB](/azure/cosmos-db/introduction) can be used in ASP.NET Core as a session state provider by using the `IDistributedCache` interface. Azure Cosmos DB is a fully managed NoSQL and relational database for modern app development that offers high availability, scalability, and low-latency access to data for mission-critical applications. @@ -213,6 +285,7 @@ When SQL Server is used as a distributed cache backing store, use of the same da * [Redis Cache on Azure](/azure/azure-cache-for-redis/) * [SQL Database on Azure](/azure/sql-database/) +* [Azure Database for PostgreSQL](/azure/postgresql/) * [ASP.NET Core IDistributedCache Provider for NCache in Web Farms](http://www.alachisoft.com/ncache/aspnet-core-idistributedcache-ncache.html) ([NCache on GitHub](https://github.com/Alachisoft/NCache)) * [Repository README file for Microsoft.Extensions.Caching.Cosmos](https://github.com/Azure/Microsoft.Extensions.Caching.Cosmos/blob/master/README.md) * diff --git a/aspnetcore/performance/caching/distributed/includes/distributed5.md b/aspnetcore/performance/caching/distributed/includes/distributed5.md index ead82e603fd0..bb964ff9c1b3 100644 --- a/aspnetcore/performance/caching/distributed/includes/distributed5.md +++ b/aspnetcore/performance/caching/distributed/includes/distributed5.md @@ -11,7 +11,7 @@ When cached data is distributed, the data: * Survives server restarts and app deployments. * Doesn't use local memory. -Distributed cache configuration is implementation specific. This article describes how to configure SQL Server and Redis distributed caches. Third party implementations are also available, such as [NCache](http://www.alachisoft.com/ncache/aspnet-core-idistributedcache-ncache.html) ([NCache on GitHub](https://github.com/Alachisoft/NCache)). Regardless of which implementation is selected, the app interacts with the cache using the interface. +Distributed cache configuration is implementation specific. This article describes how to configure SQL Server, Redis, and Postgres distributed caches. Third party implementations are also available, such as [NCache](http://www.alachisoft.com/ncache/aspnet-core-idistributedcache-ncache.html) ([NCache on GitHub](https://github.com/Alachisoft/NCache)). Regardless of which implementation is selected, the app interacts with the cache using the interface. [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/performance/caching/distributed/samples/) ([how to download](xref:index#how-to-download-a-sample)) @@ -21,6 +21,8 @@ To use a SQL Server distributed cache, add a package reference to the [Microsoft To use a Redis distributed cache, add a package reference to the [Microsoft.Extensions.Caching.StackExchangeRedis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis) package. +To use a Postgres distributed cache, add a package reference to the [Microsoft.Extensions.Caching.Postgres](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Postgres) package. + To use NCache distributed cache, add a package reference to the [NCache.Microsoft.Extensions.Caching.OpenSource](https://www.nuget.org/packages/NCache.Microsoft.Extensions.Caching.OpenSource) package. ## IDistributedCache interface @@ -39,6 +41,7 @@ Register an implementation of { + options.ConnectionString = builder.Configuration.GetConnectionString("PostgresCache"); + options.SchemaName = builder.Configuration.GetValue("PostgresCache:SchemaName", "public"); + options.TableName = builder.Configuration.GetValue("PostgresCache:TableName", "cache"); + options.CreateIfNotExists = builder.Configuration.GetValue("PostgresCache:CreateIfNotExists", true); + options.UseWAL = builder.Configuration.GetValue("PostgresCache:UseWAL", false); + + // Optional: Configure expiration settings + + var expirationInterval = builder.Configuration.GetValue("PostgresCache:ExpiredItemsDeletionInterval"); + if (!string.IsNullOrEmpty(expirationInterval) && TimeSpan.TryParse(expirationInterval, out var interval)) { + options.ExpiredItemsDeletionInterval = interval; + } + + var slidingExpiration = builder.Configuration.GetValue("PostgresCache:DefaultSlidingExpiration"); + if (!string.IsNullOrEmpty(slidingExpiration) && TimeSpan.TryParse(slidingExpiration, out var sliding)) { + options.DefaultSlidingExpiration = sliding; + } +}); + +var app = builder.Build(); +``` + +2. Use the Cache + +```csharp +public class MyService { + private readonly IDistributedCache _cache; + + public MyService(IDistributedCache cache) { + _cache = cache; + } + + public async Task GetDataAsync(string key) { + var cachedData = await _cache.GetStringAsync(key); + + if (cachedData == null) { + // Fetch data from source + var data = await FetchDataFromSource(); + + // Cache the data with options + var options = new DistributedCacheEntryOptions { + AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(30), + SlidingExpiration = TimeSpan.FromMinutes(5) + }; + + await _cache.SetStringAsync(key, data, options); + return data; + } + + return cachedData; + } +} +``` + ### Distributed NCache Cache [NCache](https://github.com/Alachisoft/NCache) is an open source in-memory distributed cache developed natively in .NET and .NET Core. NCache works both locally and configured as a distributed cache cluster for an ASP.NET Core app running in Azure or on other hosting platforms. @@ -166,6 +238,7 @@ When SQL Server is used as a distributed cache backing store, use of the same da * [Redis Cache on Azure](/azure/azure-cache-for-redis/) * [SQL Database on Azure](/azure/sql-database/) +* [Azure Database for PostgreSQL](/azure/postgresql/) * [ASP.NET Core IDistributedCache Provider for NCache in Web Farms](http://www.alachisoft.com/ncache/aspnet-core-idistributedcache-ncache.html) ([NCache on GitHub](https://github.com/Alachisoft/NCache)) * * diff --git a/aspnetcore/performance/caching/distributed/includes/distributed6-7.md b/aspnetcore/performance/caching/distributed/includes/distributed6-7.md index 8d066458a20f..a889a7117a5e 100644 --- a/aspnetcore/performance/caching/distributed/includes/distributed6-7.md +++ b/aspnetcore/performance/caching/distributed/includes/distributed6-7.md @@ -11,7 +11,7 @@ When cached data is distributed, the data: * Survives server restarts and app deployments. * Doesn't use local memory. -Distributed cache configuration is implementation specific. This article describes how to configure SQL Server and Redis distributed caches. Third party implementations are also available, such as [NCache](http://www.alachisoft.com/ncache/aspnet-core-idistributedcache-ncache.html) ([NCache on GitHub](https://github.com/Alachisoft/NCache)). Regardless of which implementation is selected, the app interacts with the cache using the interface. +Distributed cache configuration is implementation specific. This article describes how to configure SQL Server, Redis, and Postgres distributed caches. Third party implementations are also available, such as [NCache](http://www.alachisoft.com/ncache/aspnet-core-idistributedcache-ncache.html) ([NCache on GitHub](https://github.com/Alachisoft/NCache)). Regardless of which implementation is selected, the app interacts with the cache using the interface. [View or download sample code](https://github.com/dotnet/AspNetCore.Docs/tree/main/aspnetcore/performance/caching/distributed/samples/) ([how to download](xref:index#how-to-download-a-sample)) @@ -21,6 +21,7 @@ Add a package reference for the distributed cache provider used: * For a Redis distributed cache, [Microsoft.Extensions.Caching.StackExchangeRedis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis). * For SQL Server, [Microsoft.Extensions.Caching.SqlServer](https://www.nuget.org/packages/Microsoft.Extensions.Caching.SqlServer). +* For Postgres, [Microsoft.Extensions.Caching.Postgres](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Postgres). * For the NCache distributed cache, [NCache.Microsoft.Extensions.Caching.OpenSource](https://www.nuget.org/packages/NCache.Microsoft.Extensions.Caching.OpenSource). * [!INCLUDE [managed-identities](~/includes/managed-identities-test-non-production.md)] @@ -41,6 +42,7 @@ Register an implementation of [!NOTE] > A (and optionally, and ) are typically stored outside of source control (for example, stored by the [Secret Manager](xref:security/app-secrets) or in `appsettings.json`/`appsettings.{Environment}.json` files). The connection string may contain credentials that should be kept out of source control systems. +### Distributed Postgres Cache + +[Azure Database for PostgreSQL](/azure/postgresql) can be used as a distributed cache backing store via the `IDistributedCache` interface. Azure Database for PostgreSQL is a fully managed, AI-ready Database-as-a-Service (DBaaS) offering built on the open-source PostgreSQL engine, designed to support mission-critical workloads with predictable performance, robust security, high availability, and seamless scalability. + +After installing the [Microsoft.Extensions.Caching.Postgres](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Postgres) NuGet package, configure your distributed cache as follows: + +1. Register the Service + +```csharp +using Microsoft.Extensions.DependencyInjection; + +var builder = WebApplication.CreateBuilder(args); + +// Register Postgres distributed cache +builder.Services.AddDistributedPostgresCache(options => { + options.ConnectionString = builder.Configuration.GetConnectionString("PostgresCache"); + options.SchemaName = builder.Configuration.GetValue("PostgresCache:SchemaName", "public"); + options.TableName = builder.Configuration.GetValue("PostgresCache:TableName", "cache"); + options.CreateIfNotExists = builder.Configuration.GetValue("PostgresCache:CreateIfNotExists", true); + options.UseWAL = builder.Configuration.GetValue("PostgresCache:UseWAL", false); + + // Optional: Configure expiration settings + + var expirationInterval = builder.Configuration.GetValue("PostgresCache:ExpiredItemsDeletionInterval"); + if (!string.IsNullOrEmpty(expirationInterval) && TimeSpan.TryParse(expirationInterval, out var interval)) { + options.ExpiredItemsDeletionInterval = interval; + } + + var slidingExpiration = builder.Configuration.GetValue("PostgresCache:DefaultSlidingExpiration"); + if (!string.IsNullOrEmpty(slidingExpiration) && TimeSpan.TryParse(slidingExpiration, out var sliding)) { + options.DefaultSlidingExpiration = sliding; + } +}); + +var app = builder.Build(); +``` + +2. Use the Cache + +```csharp +public class MyService { + private readonly IDistributedCache _cache; + + public MyService(IDistributedCache cache) { + _cache = cache; + } + + public async Task GetDataAsync(string key) { + var cachedData = await _cache.GetStringAsync(key); + + if (cachedData == null) { + // Fetch data from source + var data = await FetchDataFromSource(); + + // Cache the data with options + var options = new DistributedCacheEntryOptions { + AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(30), + SlidingExpiration = TimeSpan.FromMinutes(5) + }; + + await _cache.SetStringAsync(key, data, options); + return data; + } + + return cachedData; + } +} +``` + ### Distributed NCache Cache [NCache](https://github.com/Alachisoft/NCache) is an open source in-memory distributed cache developed natively in .NET and .NET Core. NCache works both locally and configured as a distributed cache cluster for an ASP.NET Core app running in Azure or on other hosting platforms. @@ -162,6 +233,7 @@ When SQL Server is used as a distributed cache backing store, use of the same da * [Redis Cache on Azure](/azure/azure-cache-for-redis/) * [SQL Database on Azure](/azure/sql-database/) +* [Azure Database for PostgreSQL](/azure/postgresql/) * [ASP.NET Core IDistributedCache Provider for NCache in Web Farms](http://www.alachisoft.com/ncache/aspnet-core-idistributedcache-ncache.html) ([NCache on GitHub](https://github.com/Alachisoft/NCache)) * * diff --git a/aspnetcore/performance/caching/hybrid.md b/aspnetcore/performance/caching/hybrid.md index 23cc0bfda24c..8b2900610650 100644 --- a/aspnetcore/performance/caching/hybrid.md +++ b/aspnetcore/performance/caching/hybrid.md @@ -165,7 +165,7 @@ The following example configures the service to use a general-purpose protobuf s :::code language="csharp" source="~/performance/caching/hybrid/samples/9.x/HCMinimal2/Program.cs" id="snippet_withserializerfactory" highlight="14"::: -The secondary cache requires a data store, such as Redis or SqlServer. To use [Azure Cache for Redis](https://azure.microsoft.com/products/cache), for example: +The secondary cache requires a data store, such as Redis, SQL Server, or Postgres. To use [Azure Cache for Redis](https://azure.microsoft.com/products/cache), for example: * Install the `Microsoft.Extensions.Caching.StackExchangeRedis` package. * Create an instance of Azure Cache for Redis. @@ -190,7 +190,7 @@ For more information, see the [HybridCache serialization sample app](https://git ## Cache storage -By default `HybridCache` uses for its primary cache storage. Cache entries are stored in-process, so each server has a separate cache that is lost whenever the server process is restarted. For secondary out-of-process storage, such as Redis or SQL Server, `HybridCache` uses [the configured `IDistributedCache` implementation](xref:performance/caching/distributed), if any. But even without an `IDistributedCache`implementation, the `HybridCache` service still provides in-process caching and [stampede protection](https://en.wikipedia.org/wiki/Cache_stampede). +By default `HybridCache` uses for its primary cache storage. Cache entries are stored in-process, so each server has a separate cache that is lost whenever the server process is restarted. For secondary out-of-process storage, such as Redis, SQL Server, or Postgres, `HybridCache` uses [the configured `IDistributedCache` implementation](xref:performance/caching/distributed), if any. But even without an `IDistributedCache`implementation, the `HybridCache` service still provides in-process caching and [stampede protection](https://en.wikipedia.org/wiki/Cache_stampede). > [!NOTE] > When invalidating cache entries by key or by tags, they're invalidated in the current server and in the secondary out-of-process storage. However, the in-memory cache in other servers isn't affected. @@ -217,7 +217,7 @@ In such cases, inform `HybridCache` that it's safe to reuse instances by making ### Avoid `byte[]` allocations -`HybridCache` also provides optional APIs for `IDistributedCache` implementations, to avoid `byte[]` allocations. This feature is implemented by the preview versions of the `Microsoft.Extensions.Caching.StackExchangeRedis` and `Microsoft.Extensions.Caching.SqlServer` packages. For more information, see . +`HybridCache` also provides optional APIs for `IDistributedCache` implementations, to avoid `byte[]` allocations. This feature is implemented by the preview versions of the `Microsoft.Extensions.Caching.StackExchangeRedis`, `Microsoft.Extensions.Caching.SqlServer`, and `Microsoft.Extensions.Caching.Postgres` packages. For more information, see . Here are the .NET CLI commands to install the packages: ```dotnetcli @@ -228,6 +228,10 @@ dotnet add package Microsoft.Extensions.Caching.StackExchangeRedis dotnet add package Microsoft.Extensions.Caching.SqlServer ``` +```dotnetcli +dotnet add package Microsoft.Extensions.Caching.Postgres +``` + ## Custom HybridCache implementations A concrete implementation of the `HybridCache` abstract class is included in the shared framework and is provided via dependency injection. But developers are welcome to provide or consume custom implementations of the API, for example [FusionCache](https://github.com/ZiggyCreatures/FusionCache/blob/main/docs/MicrosoftHybridCache.md). diff --git a/aspnetcore/performance/caching/overview.md b/aspnetcore/performance/caching/overview.md index 7f41917034f6..3b03544470e1 100644 --- a/aspnetcore/performance/caching/overview.md +++ b/aspnetcore/performance/caching/overview.md @@ -23,7 +23,7 @@ For more information, see and [Troubleshoot Az ## Distributed Cache -Use a distributed cache to store data when the app is hosted in a cloud or server farm. The cache is shared across the servers that process requests. A client can submit a request that's handled by any server in the group if cached data for the client is available. ASP.NET Core works with SQL Server, [Redis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis), and [NCache](https://www.nuget.org/packages/Alachisoft.NCache.OpenSource.SDK/) distributed caches. +Use a distributed cache to store data when the app is hosted in a cloud or server farm. The cache is shared across the servers that process requests. A client can submit a request that's handled by any server in the group if cached data for the client is available. ASP.NET Core works with SQL Server, [Redis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis), [Postgres](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Postgres), and [NCache](https://www.nuget.org/packages/Alachisoft.NCache.OpenSource.SDK/) distributed caches. For more information, see . diff --git a/aspnetcore/performance/caching/overview/includes/overview6.md b/aspnetcore/performance/caching/overview/includes/overview6.md index 1e1404ceb4bc..cf4eb06cfa3a 100644 --- a/aspnetcore/performance/caching/overview/includes/overview6.md +++ b/aspnetcore/performance/caching/overview/includes/overview6.md @@ -8,7 +8,7 @@ For more information, see and [Troubleshoot Az ## Distributed Cache -Use a distributed cache to store data when the app is hosted in a cloud or server farm. The cache is shared across the servers that process requests. A client can submit a request that's handled by any server in the group if cached data for the client is available. ASP.NET Core works with SQL Server, [Redis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis), and [NCache](https://www.nuget.org/packages/Alachisoft.NCache.OpenSource.SDK/) distributed caches. +Use a distributed cache to store data when the app is hosted in a cloud or server farm. The cache is shared across the servers that process requests. A client can submit a request that's handled by any server in the group if cached data for the client is available. ASP.NET Core works with SQL Server, [Redis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis), [Postgres](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Postgres), and [NCache](https://www.nuget.org/packages/Alachisoft.NCache.OpenSource.SDK/) distributed caches. For more information, see . diff --git a/aspnetcore/performance/caching/overview/includes/overview7-8.md b/aspnetcore/performance/caching/overview/includes/overview7-8.md index b714ffbca6ab..9594865fb465 100644 --- a/aspnetcore/performance/caching/overview/includes/overview7-8.md +++ b/aspnetcore/performance/caching/overview/includes/overview7-8.md @@ -8,7 +8,7 @@ For more information, see and [Troubleshoot Az ## Distributed Cache -Use a distributed cache to store data when the app is hosted in a cloud or server farm. The cache is shared across the servers that process requests. A client can submit a request that's handled by any server in the group if cached data for the client is available. ASP.NET Core works with SQL Server, [Redis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis), and [NCache](https://www.nuget.org/packages/Alachisoft.NCache.OpenSource.SDK/) distributed caches. +Use a distributed cache to store data when the app is hosted in a cloud or server farm. The cache is shared across the servers that process requests. A client can submit a request that's handled by any server in the group if cached data for the client is available. ASP.NET Core works with SQL Server, [Redis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis), [Postgres](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Postgres), and [NCache](https://www.nuget.org/packages/Alachisoft.NCache.OpenSource.SDK/) distributed caches. For more information, see . diff --git a/aspnetcore/performance/caching/response.md b/aspnetcore/performance/caching/response.md index fa7bc725b0ec..8dcbbaa35a0d 100644 --- a/aspnetcore/performance/caching/response.md +++ b/aspnetcore/performance/caching/response.md @@ -245,7 +245,7 @@ For more information, see and [Troubleshoot Az ### Distributed Cache -Use a distributed cache to store data in memory when the app is hosted in a cloud or server farm. The cache is shared across the servers that process requests. A client can submit a request that's handled by any server in the group if cached data for the client is available. ASP.NET Core works with SQL Server, [Redis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis), and [NCache](https://www.nuget.org/packages/Alachisoft.NCache.OpenSource.SDK/) distributed caches. +Use a distributed cache to store data in memory when the app is hosted in a cloud or server farm. The cache is shared across the servers that process requests. A client can submit a request that's handled by any server in the group if cached data for the client is available. ASP.NET Core works with SQL Server, [Redis](https://www.nuget.org/packages/Microsoft.Extensions.Caching.StackExchangeRedis), [Postgres](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Postgres), and [NCache](https://www.nuget.org/packages/Alachisoft.NCache.OpenSource.SDK/) distributed caches. For more information, see . diff --git a/aspnetcore/release-notes/aspnetcore-9/includes/hybrid-cache.md b/aspnetcore/release-notes/aspnetcore-9/includes/hybrid-cache.md index ea0cd27e10d6..6a288d263745 100644 --- a/aspnetcore/release-notes/aspnetcore-9/includes/hybrid-cache.md +++ b/aspnetcore/release-notes/aspnetcore-9/includes/hybrid-cache.md @@ -126,7 +126,7 @@ By reusing instances, `HybridCache` can reduce the overhead of CPU and object al Like `IDistributedCache`, `HybridCache` supports removal by key with a `RemoveKeyAsync` method. `HybridCache` also provides optional APIs for `IDistributedCache` implementations, to avoid `byte[]` allocations. This feature is implemented -by the preview versions of the `Microsoft.Extensions.Caching.StackExchangeRedis` and `Microsoft.Extensions.Caching.SqlServer` packages. +by the preview versions of the `Microsoft.Extensions.Caching.StackExchangeRedis`, `Microsoft.Extensions.Caching.SqlServer`, and `Microsoft.Extensions.Caching.Postgres` packages. Serialization is configured as part of registering the service, with support for type-specific and generalized serializers via the `WithSerializer` and `.WithSerializerFactory` methods, chained from the `AddHybridCache` call. By default, the library