container icon indicating copy to clipboard operation
container copied to clipboard

Create TimeControlledLifetimeManager

Open ENikS opened this issue 6 years ago • 0 comments

Description

A TimeControlledLifetimeManager is a manager that holds value only certain amount of time.

Problem

Caching time sensitive information, such as security tokens, is an involved process. Automating the whole thing is even more involved.

Solution

This lifetime controller alone with the ability to register a factory, should solve some of the complexity. The manager should operate like this:

  • When created, the TimeControlledLifetimeManager should take a time span for the information to be valid.
  • When set, the manager also sets the time
  • When value is requested, the manager checks if request is within valid time span and if yes, returns the value
  • If valid time already elapsed, it returns NoValue forcing resolution of the new value

Impact

None.

ENikS avatar Jun 10 '20 16:06 ENikS