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

Add Cache Abstraction #141

Open
jbee opened this issue Dec 11, 2020 · 0 comments
Open

Add Cache Abstraction #141

jbee opened this issue Dec 11, 2020 · 0 comments

Comments

@jbee
Copy link
Owner

jbee commented Dec 11, 2020

It is quite usual that managed instances use some form of cache.
Caches are not modelled as direct fields so that they can be changed using bindings.
In case of the Injector context this is mostly a in-memory map.

There are always steps that are repeated to set this up.
A base module binds a default map for a certain Name key to identify the cache used for the managed instance.
The managed instance resolves the cache to use it.

This would be a bit easier and more formalised in its role if there was a Cache interface for such purposes and a cache provider service that would provide the cache for the target class using the targets class as a key Name.
One benefit is that this makes the setup step of binding a default for a particular cache unnecessary.

Long term this could have the benefit of a more powerful Cache abstraction emerging that yields a suitable cache implementation based on properties provided when resolving it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant