XiHan.Framework.Caching.Remote 5.0.0-preview.1

Prefix Reserved
This is a prerelease version of XiHan.Framework.Caching.Remote.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package XiHan.Framework.Caching.Remote --version 5.0.0-preview.1
                    
NuGet\Install-Package XiHan.Framework.Caching.Remote -Version 5.0.0-preview.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XiHan.Framework.Caching.Remote" Version="5.0.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XiHan.Framework.Caching.Remote" Version="5.0.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="XiHan.Framework.Caching.Remote" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XiHan.Framework.Caching.Remote --version 5.0.0-preview.1
                    
#r "nuget: XiHan.Framework.Caching.Remote, 5.0.0-preview.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package XiHan.Framework.Caching.Remote@5.0.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XiHan.Framework.Caching.Remote&version=5.0.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=XiHan.Framework.Caching.Remote&version=5.0.0-preview.1&prerelease
                    
Install as a Cake Tool

XiHan.Framework.Caching.Remote

caching.distributed@1 的远程 Provider 适配器(Ring 3,RFC-0019,Experimental):存储由任意语言写的进程外插件承担,插件只需实现固定的操作集 cache-entries.get / set / try-add / remove / try-remove / get-many / set-many / remove-many(spec/provider/caching-distributed.md),本包把它接成 ICacheStore、ISharedCache、IDistributedLock 与幂等中间件,和 Caching.Redis 一样参与能力求解。Go 实现见 framework-sdk-go 的 caching 包与 examples/cache,示例插件见 samples/CacheGoPlugin。

builder.AddXiHan(x => x.UseStandardProfile().UseFeature<OutOfProcessPluginsFeature>().UseFeature<RemoteCachingFeature>());
{
  "XiHan": {
    "Plugins": { "OutOfProcess": { "Directories": ["plugins/cache-go"] } },
    "Caching": { "Remote": { "TimeoutMilliseconds": 5000 } }
  }
}

责任边界

  • RemoteCacheStore 每个操作按 ID 从宿主操作登记表取代理操作并直接执行(IOperationInvoker.ExecuteAsync),不经过管道:存储会被幂等中间件在管道里使用,走管道会递归;也不需要授权与幂等。每次调用带 Timeout 的截止时间。
  • 键与过期选项在 .NET 侧先按 CacheKey / CacheEntryOptions 校验,再编码成操作集的 JSON(值为 base64、过期为毫秒)。
  • 插件返回的缓存域错误(CACHING_VALIDATION_00x)原样成为 FrameworkException;插件未加载、操作未登记、进程不可达、超时都映射为 CACHING_UNAVAILABLE_001,细节带原错误码,不伪装成未命中。
  • 本包只提供能力,不启动插件进程;插件由 Plugins.OutOfProcess 按 XiHan:Plugins:OutOfProcess:Directories 发现。插件侧错误的消息键 caching.remote.* 的十种语言译文随本包嵌入;插件握手若也带同名目录 caching.remote(如 SDK 示例带两种语言),注册时两份合并为一份,同一键同一区域的模板不同则启动失败(LOCALIZATION_CONFLICT_001,RFC-0010)。
  • 适配器 + 插件的组合必须通过 Caching.Conformance 全部用例;samples/CacheGoPlugin 在 Caching.Remote.Tests 里跑完整套件。

依赖方向

Caching.Abstractions → 本包;本包不引用任何插件宿主包,只依赖宿主已登记的操作。

状态

Experimental:操作集覆盖 RFC-0006 的五个原子操作与三个批量操作;其他子系统的远程 Provider 操作集随各自的示例补充。

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.0-preview.2 43 11/6/2026
5.0.0-preview.1 45 11/4/2026