Skip to content

Allow Scoped values that do not implement IDisposable #720

@PrimaForge

Description

@PrimaForge

I would like to use the ScopedCache as a "While Scoped values are in use it will not be removed from the cache. The value does not have to be IDisposable." Is there a reason for the IDisposable restraint?

I would assume the value could be checked to see if it implements IDisposable and dispose the value if necessary. Of Course, I could create a Disposable wrapper, but Lifetime is already a wrapper I Would prefer not to create yet another wrapper if the constraint is no necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions