AppFabric缓存优先级...缓存是否优先;即使是无意中? [英] AppFabric Cache Priority... Are caches prioritized; even if unintentionally?

查看:87
本文介绍了AppFabric缓存优先级...缓存是否优先;即使是无意中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

过去几个月我在AppFabric缓存中看到了一致的可重复行为,这让我相信并非所有缓存都是平等的!  我之前已经问过这个问题,并且确认没有可靠的顺序来加载缓存
,优先级等等。但是,这并不能解释我测试的一些结果。 ..

I've seen come consistently repeatable behavior in the AppFabric cache over the past few months that leads me to believe not all caches are equal!  I've asked the question before and it was confirmed that there is no dependable order in which caches are loaded, prioritized, etc.  However, this doesn't explain some of the results of my testing...

我有三个缓存:配置,帐户,文档我正在构建缓存在各种存储方案下的行为原型。  由于这些名称意味着配置存储配置数据,并且设置为永不过期且永不驱逐(我意识到
这违反了一个最佳实践,但它确实是小数据,这是一个测试环境)。

I have three caches: Configuration, Accounts, Documents that I'm prototyping how the cache will behave under various storage scenarios.  As the names imply Configuration stores configuration data and is setup to never expire and never evict (I realize this goes against one of the Best Practices but it really small data and this is a test environment).

帐户存储不会生成历史信息的客户,产品等信息;假设,当然不需要审计跟踪,而文档将存储"历史"信息。信息明显的原因。  在这些缓存中,对象
可以过期并被驱逐。

Accounts store information like Customers, Products, etc. that don't generate historical information; assuming, of course an audit trail isn't required and Documents would store "historical" information for obvious reasons.  In these caches, objects can expire and be evicted.

所有缓存都启用了ReadThrough / WriteBehind。

All caches have ReadThrough/WriteBehind enabled.

我已经注意到使用这些缓存的两个关键事项:

I've noticed two key things working with these caches:

1。当我发出powershell命令start-cachecluster时,始终首先加载配置缓存。

1. The Configuration cache is always loaded first when I issue the powershell command start-cachecluster.

2。当配置缓存中出现错误(即无法找到ProviderType程序集)时,缓存不会加载。  但是,如果其他缓存中存在相同的错误,则缓存加载正常而没有任何错误。

2. When there's an error in the Configuration Cache (i.e. ProviderType assembly cannot be found) the cache doesn't load.  However, if the same error exists in the other caches, the cache loads fine without any errors.

我注意到其他一些但是这两个我可以一致地重复。  我甚至尝试过重建缓存(当我从1.0升级到1.1时,我卸载并重新安装);第二次我确定不首先创建配置缓存,而
行为仍然是相同的。

I've noticed some others but these two I can repeat consistently.  I've even tried rebuilding the cache (when I upgraded from 1.0 to 1.1, I uninstalled and reinstalled); the second time I was sure not to create the Configuration cache first and the behavior is still the same.

有没有人注意到这种行为?  第二个特别令人烦恼,因为这些错误可能直到运行时才出现。

Has anyone noticed this sort of behavior also?  The second one is especially vexing because such errors might not show up until runtime.

我受到启发,因为我正在试图找出为什么配置缓存是唯一一个可以ReadThrough / WriteBehind(它们都在一个点上工作)并且它更加困难,因为似乎所有缓存
被平等对待......

I was inspired to start this discussion because I'm currently trying to figure out why the Configuration cache is the only one that can ReadThrough/WriteBehind (they were all working at one point) and its so much more difficult because it seems all the caches are treated equally...

任何注意到相同行为的观察,见解或建议都会受到高度赞赏,因为我正在努力了解此缓存的确切运作方式。

Any observations, insights or suggestions who has noticed the same behavior would be greatly appreciated as I'm trying to understand exactly how this cache works.

谢谢!

谢谢,KBW

推荐答案

嗨KBW,

没有定义创建高速缓存的顺序。缓存创建过程按照从群集配置中检索缓存名称列表的顺序启动。无法保证此订单与XML配置中定义
的顺序相同,创建完成的顺序与启动顺序相同​​, 或者该命令将在缓存和.Net Framework的版本和版本中保持相同。基本上所有的
缓存都是平等对待的,但显然有些缓存可能最终会在其他缓存之前创建。

There is no defined order in which caches are created. The cache creation process is kick-started in the order in which caches name list is retrieved from the cluster configuration. There is no guarantee that this order is the same as that the order in which they are defined in the XML configuration, the order in which the creation completes is the same as that in which it is started, or that the order will remain the same accross releases and versions of cache and the .Net Framework. Essentially all caches are treated equally, but obviously some caches may end up being created before others.

所有缓存都是为了所有实际目的而平等对待,所以它不太可能缓存的行为应该不同。你可以分享你的群集配置文件,以及更多信息吗,所以我可以看一下,看看我是否有可能重新报告你的问题?

All caches are for all practical purposes treated equally, so it is highly unlikely the caches should behave differently. Could you share out you cluster configuration files, and more info, so I can take a look and see if it is possible for me to repro your issue?

谢谢,

Arijit

Thanks,
Arijit


这篇关于AppFabric缓存优先级...缓存是否优先;即使是无意中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆