Skip to content

Commit 1a28cee

Browse files
committed
- Fix AddTag not working correctly
1 parent e553d24 commit 1a28cee

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

PlayerTrack.Plugin/Domain/Services/TagService.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ private void UpdateTagInCacheAndRepository(Tag tag)
6262
private void AddTagToCacheAndRepository(Tag tag)
6363
{
6464
tag.Id = RepositoryContext.TagRepository.CreateTag(tag);
65-
66-
if (Cache.TryGetValue(tag.Id, out var existingValue))
67-
Cache.TryUpdate(tag.Id, tag, existingValue);
68-
65+
Cache.TryAdd(tag.Id, tag);
6966
ServiceContext.PlayerCacheService.AddTag(tag.Id);
7067
}
7168

@@ -78,7 +75,6 @@ private void DeleteTagFromCacheAndRepository(Tag tag)
7875
private void ReloadTagCache() =>
7976
ExecuteReloadCache(() =>
8077
{
81-
Plugin.PluginLog.Information("Entering TagService.ReloadTagCache()");
8278
var tags = RepositoryContext.TagRepository.GetAllTags();
8379
if (tags == null)
8480
{

0 commit comments

Comments
 (0)