![]() |
VOOZH | about |
dotnet add package GroupDocs.Viewer.UI.Api.InMemory.Cache --version 26.4.0
NuGet\Install-Package GroupDocs.Viewer.UI.Api.InMemory.Cache -Version 26.4.0
<PackageReference Include="GroupDocs.Viewer.UI.Api.InMemory.Cache" Version="26.4.0" />
<PackageVersion Include="GroupDocs.Viewer.UI.Api.InMemory.Cache" Version="26.4.0" />Directory.Packages.props
<PackageReference Include="GroupDocs.Viewer.UI.Api.InMemory.Cache" />Project file
paket add GroupDocs.Viewer.UI.Api.InMemory.Cache --version 26.4.0
#r "nuget: GroupDocs.Viewer.UI.Api.InMemory.Cache, 26.4.0"
#:package GroupDocs.Viewer.UI.Api.InMemory.Cache@26.4.0
#addin nuget:?package=GroupDocs.Viewer.UI.Api.InMemory.Cache&version=26.4.0Install as a Cake Addin
#tool nuget:?package=GroupDocs.Viewer.UI.Api.InMemory.Cache&version=26.4.0Install as a Cake Tool
GroupDocs.Viewer.UI.Api.InMemory.Cache is an in-memory caching implementation that can be used with GroupDocs.Viewer.UI.Api. It provides fast, in-memory caching for document rendering results in your GroupDocs.Viewer.UI application.
To use InMemory Cache in your ASP.NET Core project:
dotnet add package GroupDocs.Viewer.UI.Api.InMemory.Cache
Startup class:var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddGroupDocsViewerUI();
builder.Services
.AddControllers()
.AddGroupDocsViewerSelfHostApi()
.AddLocalStorage("./Files")
.AddInMemoryCache(config =>
{
config.SetCacheEntryExpirationTimeoutMinutes(60); // Cache entries expire after 60 minutes
config.SetGroupCacheEntriesByFile(true); // Group cache entries by file
});
var app = builder.Build();
app
.UseRouting()
.UseEndpoints(endpoints =>
{
endpoints.MapGroupDocsViewerUI(options =>
{
options.UIPath = "/viewer";
options.ApiEndpoint = "/viewer-api";
});
endpoints.MapGroupDocsViewerApi(options =>
{
options.ApiPath = "/viewer-api";
});
});
await app.RunAsync();
The InMemory Cache implementation supports the following configuration options:
CacheEntryExpirationTimeoutMinutes (Optional): The expiration timeout of each cache entry in minutes. Default is 0, which means cache entries never expire.GroupCacheEntriesByFile (Optional): When enabled, eviction of any cache entry leads to eviction of all cache entries for that file. This setting only takes effect when CacheEntryExpirationTimeoutMinutes is greater than zero.You can also configure these settings through appsettings.json:
{
"GroupDocsViewerUIApiInMemoryCache": {
"CacheEntryExpirationTimeoutMinutes": 60,
"GroupCacheEntriesByFile": true
}
}
The InMemory Cache implementation uses ASP.NET Core's built-in IMemoryCache for storing cached data. Here's how it works:
{filePath}_{cacheKey}filePath represents the document being cachedcacheKey represents the specific cached item (e.g., page thumbnail, page content)MemoryCacheEntryOptions for controlling entry behaviorIFileCache interfaceWhen CacheEntryExpirationTimeoutMinutes is set:
CancellationTokenSource is created for each cache entryCancellationChangeTokenWhen GroupCacheEntriesByFile is enabled:
CancellationTokenSource is shared among all cache entries for a file{filePath}__CTSWhen using InMemory Cache:
This project is licensed under the MIT License - see the file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 26.4.0 | 116 | 4/29/2026 |
| 26.3.0 | 114 | 3/4/2026 |
| 8.1.5 | 119 | 2/19/2026 |
| 8.1.4 | 120 | 2/13/2026 |
| 8.1.3 | 114 | 2/11/2026 |
| 8.1.2 | 383 | 11/17/2025 |
| 8.1.1 | 281 | 9/21/2025 |
| 8.0.7 | 374 | 5/23/2025 |
| 8.0.6 | 228 | 5/5/2025 |
| 8.0.5 | 250 | 4/23/2025 |
| 8.0.4 | 261 | 4/22/2025 |
| 8.0.3 | 214 | 4/4/2025 |
| 8.0.2 | 200 | 2/6/2025 |
| 8.0.1 | 234 | 12/20/2024 |
| 8.0.0 | 201 | 12/16/2024 |
| 6.0.5 | 194 | 12/2/2024 |
| 6.0.4 | 217 | 9/30/2024 |
| 6.0.3 | 1,161 | 6/11/2024 |
| 6.0.2 | 2,271 | 6/29/2023 |
| 6.0.1 | 275 | 6/29/2023 |