- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
不想将 client.ncconf
留在我的 exe
旁边,我希望能够指定 client.ncconf
的路径> 以编程方式归档。我可以怎样呢?我正在使用 NCache 4.4SP1 开源。
我使用的方法主要是 Web.Caching.NCache.InitializeCache
和 Cache.Get
。
最佳答案
它从 %NCHOME%
InstallDir/config
中选择配置。只需在您的 AppSettings 中添加以下内容
<add key="InstallDir" value="C:\temp"/>
此外,所有客户端配置都可以使用CacheInitParams
以编程方式指定。你可以
namespace Alachisoft.NCache.Web.Caching
{
public class CacheInitParams : ICloneable
{
public CacheInitParams();
public string BindIP { get; set; }
public ClientCacheSyncMode ClientCacheSyncMode { get; set; }
public int ClientRequestTimeOut { get; set; }
public int CommandRetries { get; set; }
public int CommandRetryInterval { get; set; }
public int ConnectionRetries { get; set; }
public int ConnectionTimeout { get; set; }
public string DefaultReadThruProvider { get; set; }
public string DefaultWriteThruProvider { get; set; }
public bool LoadBalance { get; set; }
public CacheMode Mode { get; set; }
[Obsolete("This property is deprecated. Please use the 'ServerList' property instead.", false)]
public int Port { get; set; }
public SecurityParams PrimaryUserCredentials { get; set; }
public int RetryConnectionDelay { get; set; }
public int RetryInterval { get; set; }
public SecurityParams SecondaryUserCredentials { get; set; }
[Obsolete("This property is deprecated. Please use the 'ServerList' property instead.", false)]
public string Server { get; set; }
public CacheServerInfo[] ServerList { get; set; }
public object Clone();
}
}
关于ncache - 如何以编程方式加载 NCache 客户端配置的特定文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35461793/
我正在审查 NCache,因为我们希望摆脱 AppFabric。目前,我只使用开源版本,而且非常简单。但是,我无法找到如何为添加到缓存的项目指定默认超时。 我知道我可以使用绝对或滑动过期来明确说明项目
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 6年前关闭。 Improve t
不想将 client.ncconf 留在我的 exe 旁边,我希望能够指定 client.ncconf 的路径> 以编程方式归档。我可以怎样呢?我正在使用 NCache 4.4SP1 开源。 我使用的
当我在 Visual Studio Pro 2013/2015 中尝试通过 NCache Explore 添加新的本地缓存时,输入 IP 地址和缓存名称后,NCache Explore 提示如下错误信
我正在评估 NCache 在正在进行的项目中作为“通读”缓存的使用情况 - 以减轻 SQL Server 的负载。 在客户端,该项目有一个轮询例程,该例程接收按上次轮询日期时间过滤(在服务器端)的项目
自过去几周以来,我一直在评估 NCache。 Mu 问题特定于查询缓存数据的技术。我正在寻找类似于下面提到的 ADO.NET 技术的东西。一次提供多个查询并逐个遍历结果集的要求。 以上述方式从数据库中
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 去年关闭。 Improve this question
我们正在将所有或大部分 .NET 4.6 MVC WebAPI Controller 方法重构为 async方法。 这似乎适用于具有可等待方法的较低级别调用的方法,例如 SQL 命令执行;然而,我们正
我是一名优秀的程序员,十分优秀!