I am trying to implement the following pattern in a Cache layer.
I'm splitting the implementation of possible Cache methods such as
getUsers() in UserCache Class,
getLikes() in PostsCache class.
But I'd like all these methods to be accessible from a Single class object such as
The reason behind this is, I'd like the developers who're using this layer to be unaware of the split that's been done behind this layer.
I've done the following
2 Interfaces -
UserCache, PostsCache and
2 Classes implementing the interfaces -
I tried to introduce a abstract class AbstractCache that implements these 2 interfaces and then this Cache class will extend that abstract class. But that failed :(
Now how can I combine these two be accessible from a single
Cache object. Please guide me