Krishh
Krishh

Reputation: 4231

Auto expire reliable dictionary objects in Azure Service Fabric Stateful services

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!

Upvotes: 4

Views: 869

Answers (2)

alltej
alltej

Reputation: 7285

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

Upvotes: 0

Vaclav Turecek
Vaclav Turecek

Reputation: 9050

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!

Upvotes: 7

Related Questions