[英]IgniteOutputCacheProvider example, how to initialize this class?
I've just started using Apache Ignite for .NET. 我刚刚开始使用Apache Ignite for .NET。 In particular I am trying to write an output cache for some web APIs using the following library: 特别是我正在尝试使用以下库为某些Web API编写输出缓存:
Apache.Ignite.AspNet.IgniteOutputCacheProvider Apache.Ignite.AspNet.IgniteOutputCacheProvider
Can anyone provide any example on how to Initialize this class? 任何人都可以提供有关如何初始化此类的任何示例吗?
This is the Initialize() function: 这是Initialize()函数:
public override void Initialize(string name, NameValueCollection config)
{
base.Initialize(name, config);
var cache = ConfigUtil.InitializeCache<string, object>(config, GetType(), null);
_expiryCacheHolder = new ExpiryCacheHolder<string, object>(cache);
}
I would like to see an example on how to use this WITHOUT using any xml file. 我想看一个如何在不使用任何xml文件的情况下使用它的示例。 I already have a running instance of Ignite, how can I pass it to this class? 我已经有一个正在运行的Ignite实例,如何将它传递给这个类?
Thank you. 谢谢。
If Ignite instance is running within the same process, then just use Ignition.GetIgnite()
method to acquire it. 如果Ignite实例在同一进程中运行,则只需使用Ignition.GetIgnite()
方法即可获取它。
If you mean that there are standalone server(s) running, then you still have to start an embedded client to connect to cluster using Ignition.Start(..)
. 如果您的意思是运行独立服务器,那么您仍然必须使用Ignition.Start(..)
启动嵌入式客户端以连接到群集。 XML is not required, you can create configuration programmatically: https://apacheignite-net.readme.io/docs/configuration#c-code XML不是必需的,您可以以编程方式创建配置: https : //apacheignite-net.readme.io/docs/configuration#c-code
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.