var scoping and better default localCacheSize for s3 lib