Assume we have two classes (real and proxy one) which implement the same interface. One implementation is a proxy which relates operations to the any other wrapped implementation (caching).
I would like to have a module which binds real implementations to the interface so whenever it is installed the application will work. But at the same time I would like to make the application use the cached version if it was installed (and the proxy ones should have the real ones injected).
How to do it with Guice?