4

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!

Krishh
  • 4,111
  • 5
  • 42
  • 52

2 Answers2

7

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!

Vaclav Turecek
  • 9,020
  • 24
  • 29
  • So how do you do a sweep up? It looks like there is only .ClearAsync() available and it clears they entire dictionary, not purging individual items. – Tony Jul 07 '18 at 07:31
0

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

alltej
  • 6,787
  • 10
  • 46
  • 87