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

Support fields for cache retrieval #9

Open
pergerch opened this issue Nov 6, 2020 · 0 comments
Open

Support fields for cache retrieval #9

pergerch opened this issue Nov 6, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@pergerch
Copy link
Member

pergerch commented Nov 6, 2020

Instead of only looking for a property that implements IMemoryCache / IDistributedCache we shall also allow fields.

In case both a property and a field of type IMemoryCache / IDistributedCache is found in the class, the property will implicitly take precedence.

Code sample:

[Cache]
public class BasicSample
{
    public BasicSample(IMemoryCache memoryCache)
    {
        MemoryCache = memoryCache;
    }

    protected IMemoryCache MemoryCache;

    // ...
}
@pergerch pergerch added the enhancement New feature or request label Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant