feat(AppVersion): Add AppVersionService for cache invalidation on version update
Build and Deploy to Production / build-and-deploy (push) Successful in 1m37s

- Add AppVersionService to check version and clear cache if needed
- Update Configuration.Protobuf package to 0.0.4 with AppVersion proto
- Integrate version check in App.razor on app initialization
This commit is contained in:
masoodafar-web
2025-12-25 18:45:01 +03:30
parent 45a291b529
commit 516da671c6
4 changed files with 166 additions and 1 deletions
@@ -20,6 +20,7 @@ using FrontOffice.BFF.NetworkMembership.Protobuf.Protos.NetworkMembership;
using FrontOffice.BFF.DiscountShop.Protobuf.Protos.DiscountShop;
using FrontOffice.BFF.City.Protobuf;
using FrontOffice.BFF.Configuration.Protobuf.Protos.Configuration;
using FrontOffice.BFF.Configuration.Protobuf.Protos.AppVersion;
using FrontOffice.Main.Utilities;
namespace Microsoft.Extensions.DependencyInjection;
@@ -61,6 +62,8 @@ public static class ConfigureServices
services.AddScoped<ClubConfigurationService>();
services.AddScoped<NetworkMembershipService>();
services.AddScoped<CommissionService>();
// App Version Service for cache invalidation
services.AddScoped<AppVersionService>();
// Device detection: very light, dependency-free
services.AddTransient<IDeviceDetector, DeviceDetector>();
// PDF generation (Chromium only)
@@ -110,6 +113,7 @@ public static class ConfigureServices
services.AddScoped(CreateAuthenticatedClient<NetworkMembershipContract.NetworkMembershipContractClient>);
services.AddScoped(CreateAuthenticatedClient<DiscountShopContract.DiscountShopContractClient>);
services.AddScoped(CreateAuthenticatedClient<CityContract.CityContractClient>);
services.AddScoped(CreateAuthenticatedClient<AppVersionContract.AppVersionContractClient>);
return services;
}