Caching these filesystem instances is an optimization without any data to suggest that it's necessary. I think the risk of keeping long-running connections to DBs and the like open on potentially leaked cached instances is a greater risk.
This patch removes the filesystem instance caching, and always creates new instances. I've also streamlined the call signature for filesystem.create() so it doesn't require deep knowledge of how providers work.
There were some tests failing, which were looking for fs.name, fs.watch and these are not necessary. I've removed them.
I've also fixed some code style and added some basic logging.
Caching these filesystem instances is an optimization without any data to suggest that it's necessary. I think the risk of keeping long-running connections to DBs and the like open on potentially leaked cached instances is a greater risk.
This patch removes the filesystem instance caching, and always creates new instances. I've also streamlined the call signature for
filesystem.create()
so it doesn't require deep knowledge of how providers work.There were some tests failing, which were looking for
fs.name
,fs.watch
and these are not necessary. I've removed them.I've also fixed some code style and added some basic logging.