Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended way of implementing Custom lifetime using TTL logic? #401

Closed
MedAnd opened this issue Dec 22, 2017 · 2 comments
Closed

Recommended way of implementing Custom lifetime using TTL logic? #401

MedAnd opened this issue Dec 22, 2017 · 2 comments

Comments

@MedAnd
Copy link

MedAnd commented Dec 22, 2017

Is there a recommended way of implementing Custom lifetime using TTL logic?

For example I would like an object to be created as PerContainerLifetime, the same instance shared among threads, but when the instance's Time To Live (TTL) expires, it's removed and another instance is created, registered and returned to new callers instead... similar to how .Net Core IMemoryCache works?

@VictorTomaili
Copy link

http://www.lightinject.net/#custom-lifetime

You already can create your own lifetime

@MedAnd
Copy link
Author

MedAnd commented Mar 3, 2018

Prior to posting I checked the docs... what I was hoping for was best practice for creating a thread safe but shareable lifetime (with TTL feature)... will close though as more of a question...

@MedAnd MedAnd closed this as completed Mar 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants