Skip to content

Commit

Permalink
Also refresh cache on update
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeegaan committed Dec 13, 2024
1 parent d902127 commit ee0a332
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,8 @@ protected override void PersistUpdatedItem(IMember entity)

OnUowRefreshedEntity(new MemberRefreshNotification(entity, new EventMessages()));

_memberByUsernameCachePolicy.DeleteByUserName(UsernameCacheKey, entity.Username);

Check notice on line 848 in src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberRepository.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (release/13.6)

ℹ Getting worse: Complex Method

PersistUpdatedItem already has high cyclomatic complexity, and now it increases in Lines of Code from 101 to 102. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.
entity.ResetDirtyProperties();
}

Expand Down

0 comments on commit ee0a332

Please sign in to comment.