File tree Expand file tree Collapse file tree 3 files changed +4
-0
lines changed
Blazor.Server.UI/Pages/Products Expand file tree Collapse file tree 3 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ public static CancellationTokenSource SharedExpiryTokenSource()
2929 }
3030 return _tokensource ;
3131 }
32+ public static void Refresh ( ) => SharedExpiryTokenSource ( ) . Cancel ( ) ;
3233 public static MemoryCacheEntryOptions MemoryCacheEntryOptions => new MemoryCacheEntryOptions ( ) . AddExpirationToken ( new CancellationChangeToken ( SharedExpiryTokenSource ( ) . Token ) ) ;
3334}
3435
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ public static CancellationTokenSource SharedExpiryTokenSource() {
2424 }
2525 return _tokensource ;
2626 }
27+ public static void Refresh ( ) => SharedExpiryTokenSource ( ) . Cancel ( ) ;
2728 public static MemoryCacheEntryOptions MemoryCacheEntryOptions => new MemoryCacheEntryOptions ( ) . AddExpirationToken ( new CancellationChangeToken ( SharedExpiryTokenSource ( ) . Token ) ) ;
2829}
2930
Original file line number Diff line number Diff line change 22
33@using AutoMapper
44@using BlazorDownloadFile
5+ @using CleanArchitecture .Blazor .Application .Features .Products .Caching ;
56@using CleanArchitecture .Blazor .Application .Features .Products .Commands .Delete
67@using CleanArchitecture .Blazor .Application .Features .Products .Commands .Import
78@using CleanArchitecture .Blazor .Application .Features .Products .DTOs
275276 }
276277 private async Task OnRefresh ()
277278 {
279+ ProductCacheKey .Refresh ();
278280 _selectedItems = new ();
279281 _searchString = string .Empty ;
280282 await _table .ReloadServerData ();
You can’t perform that action at this time.
0 commit comments