Skip to content

V14: Move towards get guid#15889

Merged
bergmania merged 22 commits intov14/devfrom
v14/feature/move-towards-get-guid
Apr 11, 2024
Merged

V14: Move towards get guid#15889
bergmania merged 22 commits intov14/devfrom
v14/feature/move-towards-get-guid

Conversation

@Zeegaan
Copy link
Copy Markdown
Member

@Zeegaan Zeegaan commented Mar 15, 2024

Notes

As most Get(Guid key) methods are not cached, it can hurt performance, thus this PR amends this.
There are 2 possible solutions, and they are by chance both implemented in this respectively for members & users.

  • For members, we now "map" the key to id, the IdKeyMap used Is cached, and thus this conversion from key -> id is fast.
  • For users however, we have refactored it to be the other way around, so getting by ID is not cached (this is only used in obsolete methods/tests), and the GetByKey is now cached.
    This comes with a refactor of the UserRepository that is now a Guid RepositoryBase.
  • Updated UserCacheRefreshers, to also update the GUID in the cache (aka, just remove it)

@kjac kjac self-requested a review March 18, 2024 06:14
Comment thread src/Umbraco.Core/Cache/DistributedCacheExtensions.cs Outdated
Comment thread src/Umbraco.Core/Events/UserNotificationsHandler.cs
Comment thread src/Umbraco.Core/Handlers/AuditNotificationsHandler.cs
Comment thread src/Umbraco.Core/Services/MemberService.cs
Comment thread src/Umbraco.Core/Services/MetricsConsentService.cs Outdated
Comment thread src/Umbraco.Web.Common/Security/BackofficeSecurity.cs
Comment thread src/Umbraco.Core/Cache/Refreshers/Implement/UserCacheRefresher.cs
Comment thread src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs Outdated
@bergmania bergmania merged commit d5809da into v14/dev Apr 11, 2024
@bergmania bergmania deleted the v14/feature/move-towards-get-guid branch April 11, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants