Please make it possible to customize the MachineCache (since you have hidden it inside several classes). It's the only way to customize the cache path.
Here is a suggestion:
```
public class MachineCache : LocalPackageRepository, IPackageCacheRepository
{
private const int MaxPackages = 100;
private const string NuGetCachePathEnvironmentVariable = "NuGetCachePath";
private static Lazy<MachineCache> _instance = new Lazy<MachineCache>(() => CreateDefault(GetCachePath));
public MachineCache(IFileSystem fileSystem)
: base(new DefaultPackagePathResolver(fileSystem), fileSystem, enableCaching: false)
{
}
public MachineCache(string cachePath)
: this(new PhysicalFileSystem(cachePath))
{
}
public static MachineCache Default
{
get { return _instance.Value; }
set { _instance = new Lazy<MachineCache>(() => value); }
}
// [....]
}
```
Here is a suggestion:
```
public class MachineCache : LocalPackageRepository, IPackageCacheRepository
{
private const int MaxPackages = 100;
private const string NuGetCachePathEnvironmentVariable = "NuGetCachePath";
private static Lazy<MachineCache> _instance = new Lazy<MachineCache>(() => CreateDefault(GetCachePath));
public MachineCache(IFileSystem fileSystem)
: base(new DefaultPackagePathResolver(fileSystem), fileSystem, enableCaching: false)
{
}
public MachineCache(string cachePath)
: this(new PhysicalFileSystem(cachePath))
{
}
public static MachineCache Default
{
get { return _instance.Value; }
set { _instance = new Lazy<MachineCache>(() => value); }
}
// [....]
}
```