Auto expire reliable dictionary objects in Azure Service Fabric Stateful services

你离开我真会死。 提交于 2019-12-10 16:29:53

问题


Is there any inbuilt way to set an expire time on the reliable dictionary object to expire after a certain time? Trying to see if we can start using reliable collections to store user session objects.

Can a stateless service access the dictionary objects created by a stateful service?

Sorry if these are lame questions. Trying to understand the concepts.

Thanks!


回答1:


No, there is no built-in expiration. You can certainly use collections to store user session objects but you'll have to do a sweep to clean-up expired sessions yourself.

No, stateless services can't access dictionary objects directly. The stateful service that owns the dictionary has to expose some API methods for other services to call, which is a good pattern to follow anyway.

No, not lame questions at all!




回答2:


Is this the same for reliable queues that there is no built-in auto-expiration?



来源:https://stackoverflow.com/questions/36461697/auto-expire-reliable-dictionary-objects-in-azure-service-fabric-stateful-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!