private int SetCacheSizeLimit(SetLimitOptions options) { IWin32Registry winReg = new Win32Registry(); if (options.Megabytes < 0) { winReg.CacheSizeLimit = null; } else { winReg.CacheSizeLimit = options.Megabytes * (long)1024 * (long)1024; } return(ShowCacheSizeLimit(null)); }
private int SetCacheSizeLimit(SetLimitOptions options) { IConfiguration cfg = ServiceLocator.Container.Resolve <IConfiguration>(); if (options.Megabytes < 0) { cfg.CacheSizeLimit = null; } else { cfg.CacheSizeLimit = options.Megabytes * (long)1024 * (long)1024; } return(ShowCacheSizeLimit(null)); }