pollInterval设置为60,但在5分钟后接收通知 [英] pollInterval set to 60 but receiving notifications after 5 minutes instead

查看:393
本文介绍了pollInterval设置为60,但在5分钟后接收通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的缓存中有一个项目有30秒的生存时间。  我试图将datacacheclient配置为使用60秒的通知轮询间隔。

I've got an item in my cache which has a time to live of 30 seconds.  I have attempted to configure the datacacheclient to use a notification poll interval of 60 seconds.

<dataCacheClient>
    <hosts>
        <host name="localhost"  cachePort="22233" />
    </hosts>

    <localCache isEnabled="false" sync="NotificationBased" />

    <clientNotification pollInterval="60" />
    
    <securityProperties mode="None" protectionLevel="None" />
</dataCacheClient>

当我在DataCacheFactory实例上调用GetCache时,我正在关联CacheLevelCallback(DataCacheOperations.RemoveItem,DataCacheNotificationCallback) ,我将一个项目添加到缓存中,该项目应在30秒后到期,但我的回调方法仅在五分钟后调用
,如果我循环添加项目并等待5分钟模式变得明显。

When I call GetCache on my DataCacheFactory instance I am associating a CacheLevelCallback(DataCacheOperations.RemoveItem, DataCacheNotificationCallback), I add an item to the cache that should expire in 30 seconds, but my callback method is only invoked after five minutes, if I loop adding items and waiting the 5 minute pattern become apparent.

我的缓存配置是:

CacheName  &NBSP; &NBSP; &NBSP; &NBSP;  :KeepAlive

CacheName            : KeepAlive

TimeToLive  &NBSP; &NBSP; &NBSP; &NBSP; :5分钟

TimeToLive           : 5 mins

CacheType  &NBSP; &NBSP; &NBSP; &NBSP;   ;:分区

CacheType            : Partitioned

辅助人员  &NBSP; &NBSP; &NBSP;  :0

Secondaries          : 0

IsExpirable  &NBSP; &NBSP; &NBSP;  :True

IsExpirable          : True

EvictionType  &NBSP; &NBSP; &NBSP; :LRU

EvictionType         : LRU

NotificationsEnabled:True

NotificationsEnabled : True

 

虽然缓存上的默认TTL是5分钟,但我通过Put方法缓存30秒。  将pollInterval设置为240,每隔4分钟给我一次通知,是否有一些下限,如果穿透,则给出默认的300秒
时间?

Although the default TTL on the cache is 5 minutes I am caching for 30 seconds via the Put method.  Setting the pollInterval to 240, gives me notifications at 4 minute intervals, is there some lower bound which if penetrated give the default 300 seconds timings?

干杯,

Steve

推荐答案

嗨Steve,

Hi Steve,

你是什么有人注意到了。通常在缓存中,每5分钟定期收集过期的对象,此时只发送通知。

What you are noticing is expected. Normally in the cache the expired object are collected periodically every 5 minutes and at that time only the notification is sent.

Anshul-MSFT

Anshul-MSFT

 


这篇关于pollInterval设置为60,但在5分钟后接收通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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