[ad_1]
Within my application, I have two different, existing services (that do not directly communicate) that need to access some of the same information (storing new entries and retrieving existing entries) that is stored in a cache. I’ve currently got the cache in its own class (B) but am unsure how to get the two classes, C and D, to access it as well. Due to the complexity of the application and how these services operate, I am unable to have another class (A) instantiate the cache (B), and pass that reference to C and D. Are there any existing design patterns or implementations I could follow?
[ad_2]