Note, this should only be called when assigning the result to a global value. If not, the global cache ref will not be the same, and this does nothing.
Note, this should only be called when assigning the result to a global value. If not, the global cache ref will not be the same, and this does nothing.
--- good --- val res: ULayer[Int] = GlobalLayer.cacheVal { ZLayer { Random.nextInt } }