Skip to content

Conversation

@AndyButland
Copy link
Contributor

Ports #20344 for Umbraco 16.

Copilot AI review requested due to automatic review settings October 2, 2025 08:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a regression in dictionary item caching where null representations for missing dictionary items were not being cached properly. The fix ensures that null values can be cached and retrieved correctly using a special null representation constant.

  • Refactors cache item retrieval logic to properly handle null representations
  • Adds comprehensive test coverage for dictionary repository caching behavior
  • Introduces helper methods to distinguish between actual nulls and cached null representations

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DictionaryRepositoryTest.cs Adds extensive test coverage for dictionary repository caching scenarios with both existing and non-existing values
src/Umbraco.Core/Cache/AppCacheExtensions.cs Refactors cache retrieval logic to properly handle null representations and distinguish between actual nulls and cached nulls

@AndyButland AndyButland changed the title Caching: Fixes regression of the caching of null representations for missing dictionary items Caching: Fixes regression of the caching of null representations for missing dictionary items (closes #20336 for 16) Oct 2, 2025
@AndyButland AndyButland requested a review from Copilot October 2, 2025 08:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

@umbracocommunity
Copy link

This pull request has been mentioned on Umbraco community forum. There might be relevant details there:

https://forum.umbraco.com/t/website-significantly-slower-since-upgrading-from-v13-to-v16/6049/9

Copy link
Contributor

@kjac kjac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@kjac kjac enabled auto-merge (squash) October 2, 2025 17:36
@kjac kjac merged commit 61277b3 into main Oct 2, 2025
24 of 25 checks passed
@kjac kjac deleted the v16/bugfix/fix-handling-of-null-representation-in-cache branch October 2, 2025 18:10
AndyButland added a commit that referenced this pull request Oct 2, 2025
…missing dictionary items (closes #20336 for 16) (#20349)

* Ports fix to regression of the caching of null representations for missing dictionary items.

* Fixed error raised in code review.

---------

Co-authored-by: Kenn Jacobsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants