2 ms·
Is SomeCache a dummy or no-op item, or does it contain an actual implementation, e.g. file or database access? To what extent is it important to make sure the
by Terr_ 12y ago
Is SomeCache a dummy or no-op item, or does it contain an actual implementation, e.g. file or database access?
To what extent is it important to make sure the person wiring things up knows and approves of what SomeCache does?
- sprain 12y agoSomeCache is a real, functioning implementation. Maybe cache is a bad example. It could also be a HTTP client to fetch some data over an api. Let's say the library by default uses Guzzle. But if a user for some reason wants to inject his own implementation of Guzzle or even BuzzBrowser (which is compatible for basic operations) instead, he can. For most simple projects, especially without a framework, the default implementation does the job and would save you some code.