Compare commits

..
2 Commits
Author SHA1 Message Date
xrain 162b92a415 增加了cache.Remove 2026-04-26 01:23:14 +08:00
xrain a859986a93 fix csproj 2026-04-24 09:29:02 +08:00
2 changed files with 5 additions and 17 deletions
+5
View File
@@ -19,6 +19,11 @@ public class SimApiCache(IDistributedCache cache)
} }
} }
public void Remove(string key)
{
cache.Remove(Prefix + key);
}
public string? Get(string key) public string? Get(string key)
{ {
return cache.GetString(Prefix + key); return cache.GetString(Prefix + key);
-17
View File
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<PackOnBuild>true</PackOnBuild> <PackOnBuild>true</PackOnBuild>
@@ -12,10 +11,6 @@
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks> <TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Folder Include="Communications\"/>
<Folder Include="Exceptions\"/>
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.22" /> <PackageReference Include="Hangfire.AspNetCore" Version="1.8.22" />
<PackageReference Include="Hangfire.Console" Version="1.4.3"/> <PackageReference Include="Hangfire.Console" Version="1.4.3"/>
@@ -26,16 +21,4 @@
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="10.1.0" /> <PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="10.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="10.1.0" /> <PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="10.1.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include=".github\workflows\nuget-publish.yml" />
</ItemGroup>
<ProjectExtensions>
<MonoDevelop>
<Properties>
<Policies>
<DotNetNamingPolicy ResourceNamePolicy="FileFormatDefault" DirectoryNamespaceAssociation="PrefixedHierarchical"/>
</Policies>
</Properties>
</MonoDevelop>
</ProjectExtensions>
</Project> </Project>