@if (Enabled) { Portable devtools (enabled)

Cache size: @RuntimeCache.GenericResponseCache.Sum(x => x.Value.Cache.Count)

} else { Portable devtools (disabled) } @code { private bool Enabled { get; set; } = LocalStorageWrapper.Settings.DeveloperSettings.EnablePortableDevtools; protected override async Task OnInitializedAsync() => // if(!RuntimeCache.WasLoaded) // await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage); // StateHasChanged(); Task.Run(async () => { while (true) { await Task.Delay(100); Enabled = LocalStorageWrapper.Settings.DeveloperSettings.EnablePortableDevtools; StateHasChanged(); } }); }