Fix posizione cache redis immagini

This commit is contained in:
Samuele Locatelli
2025-08-04 11:05:53 +02:00
parent 58eb694c10
commit 93b0e4e2da
6 changed files with 11 additions and 11 deletions
@@ -53,7 +53,7 @@ namespace EgwCoreLib.Lux.Data.Services
public string LoadSvg(string imgUid)
{
// recupero img da cache
string currKey = $"{redisBaseKey}:{imgUid.Replace("/", ":")}";
string currKey = $"{redisBaseKey}:Images:{imgUid.Replace("/", ":")}";
var rawVal = _redisService.Get(currKey);
return $"{rawVal}";
}
@@ -65,7 +65,7 @@ namespace EgwCoreLib.Lux.Data.Services
public async Task<string> LoadSvgAsync(string imgId)
{
// recupero img da cache
string currKey = $"{redisBaseKey}:{imgId.Replace("/", ":")}";
string currKey = $"{redisBaseKey}:Images:{imgId.Replace("/", ":")}";
var rawVal = await _redisService.GetAsync(currKey);
return $"{rawVal}";
}
@@ -79,7 +79,7 @@ namespace EgwCoreLib.Lux.Data.Services
public bool SaveSvg(string imgId, string svgContent)
{
// salvo img in cache
string currKey = $"{redisBaseKey}:{imgId.Replace("/", ":")}";
string currKey = $"{redisBaseKey}:Images:{imgId.Replace("/", ":")}";
var done = _redisService.Set(currKey, svgContent);
// invio notifica nuova imgsvg sul canale... viene "reimbustata"
string notifyChannel = $"svg-gen:{imgId}";
+2 -1
View File
@@ -103,7 +103,8 @@ namespace Lux.API.Controllers
/// </summary>
/// <param name="id">id oggetto</param>
/// <returns></returns>
[HttpGet("svgFile/{id}")]
[HttpGet("svgfile/{id}")]
[HttpGet("svg-file/{id}")]
public async Task<ActionResult<string>> svgFile(string id)
{
Stopwatch sw = new Stopwatch();
+3 -4
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.9.2508.0410</Version>
<Version>0.9.2508.0411</Version>
</PropertyGroup>
<ItemGroup>
@@ -64,9 +64,8 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EgwCoreLib.Lux.Core\EgwCoreLib.Lux.Core.csproj" />
<ProjectReference Include="..\EgwCoreLib.Lux.Data\EgwCoreLib.Lux.Data.csproj" />
<ProjectReference Include="..\Lux.Data\EgwCoreLib.Lux.Data.csproj" />
<ProjectReference Include="..\EgwCoreLib.Lux.Core\EgwCoreLib.Lux.Core.csproj" />
<ProjectReference Include="..\EgwCoreLib.Lux.Data\EgwCoreLib.Lux.Data.csproj" />
</ItemGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>LUX - Web Windows MES</i>
<h4>Versione: 0.9.2508.0410</h4>
<h4>Versione: 0.9.2508.0411</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
0.9.2508.0410
0.9.2508.0411
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.9.2508.0410</version>
<version>0.9.2508.0411</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>