Comparing Global Cache with Tag and Layer for Testing
if I need a global cache, and I don't have a reason right now to replace it with a different service for testing,
would there be any reason to create a tag and layer (and provide it), if I can instead just do this?
my thinking is: build the simplest thing possible first, and later "upgrade" it to tag+layer when I need to.
as both Effect and Tag are treated equally to consume, there isn't much difference, outside hiding dependencies from caller.
The tag/layer approach would be global/singleton too for all intents and purposes from the program's perspective.
would there be any reason to create a tag and layer (and provide it), if I can instead just do this?
my thinking is: build the simplest thing possible first, and later "upgrade" it to tag+layer when I need to.
as both Effect and Tag are treated equally to consume, there isn't much difference, outside hiding dependencies from caller.
The tag/layer approach would be global/singleton too for all intents and purposes from the program's perspective.
