mozilla / makedrive

[RETIRED] Webmaker Filesystem
Mozilla Public License 2.0
351 stars 33 forks source link

Fix #385 - improve server/lib/filesystem.js #453

Closed humphd closed 9 years ago

humphd commented 9 years ago

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.

alicoding commented 9 years ago

r=me