Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes performance issues when saving document types in installations with many members by correcting the database cache rebuild logic. The root cause was that null parameters were incorrectly triggering full cache rebuilds instead of skipping cache updates for unrelated content types.
Key Changes:
- Fixed parameter interpretation in database cache rebuild methods to correctly handle null vs empty collections
- Corrected MediaCacheService to pass media type IDs instead of incorrectly named content type IDs
- Updated DatabaseCacheRebuilder to explicitly pass empty collections instead of relying on default null parameters
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| MediaCacheService.cs | Fixed parameter naming issue where contentTypeIds was passed instead of mediaTypeIds |
| DatabaseCacheRepository.cs | Corrected null vs empty collection handling in rebuild methods to match interface documentation |
| DatabaseCacheRebuilder.cs | Updated to explicitly pass empty collections instead of using default null parameters |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/Umbraco.PublishedCache.HybridCache/Persistence/DatabaseCacheRepository.cs
Show resolved
Hide resolved
src/Umbraco.PublishedCache.HybridCache/Persistence/DatabaseCacheRepository.cs
Show resolved
Hide resolved
|
I tested it with my Clean Starter Kit test site, and a document type is now fast again. The member type is still slow though, but I guess that is expected. (I have also created 20.000 article nodes, and the article document type is similarly slow to save - not as much, but noticeably) |
|
@skttl We've done some optimizations around saving large amounts of content, but I guess theres still room for improvement 🤔 |
Updated [Umbraco.Cms.Persistence.Sqlite](https://github.com/umbraco/Umbraco-CMS) from 16.2.0 to 16.3.4. <details> <summary>Release notes</summary> _Sourced from [Umbraco.Cms.Persistence.Sqlite's releases](https://github.com/umbraco/Umbraco-CMS/releases)._ ## 16.3.4 ## What's Changed ### 🐛 Bug Fixes * Content picker: Implement a specific sorting method for statuses (closes #20646) by @nielslyngsoe in umbraco/Umbraco-CMS#20609 * Caching: Resolves publish and install issues related to stale cached data retrieval (closes #20539 and #20630) by @AndyButland in umbraco/Umbraco-CMS#20640 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.3...release-16.3.4 ## 16.3.3 ## What's Changed ### 🐛 Bug Fixes * Migrations: Use reliable GUID to check for existence of data type when creating (closes #20592) by @AndyButland in umbraco/Umbraco-CMS#20604 * Trees: Restore backward compatibility for file system based tree controllers (closes #20602) by @AndyButland in umbraco/Umbraco-CMS#20608 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.2...release-16.3.3 ## 16.3.2 ## What's Changed ### 🐛 Bug Fixes * Hybrid Cache: Resolve start-up errors with mis-matched types (closes #20537) by @AndyButland in umbraco/Umbraco-CMS#20554 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.1...release-16.3.2 ## 16.3.1 ## What's Changed ### 🐛 Bug Fixes * Fixed regression caused by incorrect handling of breaking change on block editor base constructor by @BenWhite27 in umbraco/Umbraco-CMS#20532 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.0...release-16.3.1 ## 16.3.0 ## What's Changed ### 🙌 Notable Changes * Feature: Client Cache for Document Type and Data Type Detail Models by @madsrasmussen in umbraco/Umbraco-CMS#19904 * Feature: Client Cache for Document Item Models by @madsrasmussen in umbraco/Umbraco-CMS#19923 * Feature: Add client runtime cache for all item endpoints by @madsrasmussen in umbraco/Umbraco-CMS#19960 * Tiptap RTE: Unbundled "Rich Text Essentials" - Toggle basics on/off per data type by @leekelleher in umbraco/Umbraco-CMS#20042 ### 🏠 Internal * build(deps-dev): bump vite from v6 to v7 by @iOvergaard in umbraco/Umbraco-CMS#19974 ### 📦 Dependencies * Chore: upgrade typescript to 5.9 + other minors by @nielslyngsoe in umbraco/Umbraco-CMS#19914 * Bump vite-plugin-static-copy from 3.1.1 to 3.1.2 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#19969 * Bump @hey-api/openapi-ts to 0.81.1 by @iOvergaard in umbraco/Umbraco-CMS#19982 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#20114 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Login by @dependabot[bot] in umbraco/Umbraco-CMS#20181 * Dependencies: Update ImageSharp to latest patch releases (16) by @AndyButland in umbraco/Umbraco-CMS#20276 ### 🌈 Accessibility Improvements * Navigating the App Language Selector with the keyboard by @engijlr in umbraco/Umbraco-CMS#19887 * Profile: Corrected misleading button label by @OskarKruger in umbraco/Umbraco-CMS#20161 * Tiptap RTE: Adds accessibility attributes for RTE input by @OskarKruger in umbraco/Umbraco-CMS#20157 * Workspace Actions: set attributes on the right element for label to work by @nielslyngsoe in umbraco/Umbraco-CMS#20178 * Tags Property Editor: Remove tags with keyboard backspace/delete by @engijlr in umbraco/Umbraco-CMS#19892 * Accessibility changes for the top navbar tabs and settings tabs by @Abdjulaziz in umbraco/Umbraco-CMS#20107 * Update label for tree item caret to identify if open or closed by @OskarKruger in umbraco/Umbraco-CMS#20199 * Tiptap RTE: Adds hover and focus border input states by @OskarKruger in umbraco/Umbraco-CMS#20172 * Installer: Improves user accessibility by adding missing <form> elements and setting the right focus by @iOvergaard in umbraco/Umbraco-CMS#20265 * Allow open split view using the keyboard by @engijlr in umbraco/Umbraco-CMS#19927 ### 🚀 New Features * Update dotnet new umbraco-extension template with newer @hey-api/openapi-ts by @warrenbuckley in umbraco/Umbraco-CMS#19825 * Workspace view navigation context by @nielslyngsoe in umbraco/Umbraco-CMS#19255 * Add timestamps to cache entries and server events by @madsrasmussen in umbraco/Umbraco-CMS#19976 * Block workspace view validation badges by @nielslyngsoe in umbraco/Umbraco-CMS#19987 * Section Sidebar Menu Expansion by @madsrasmussen in umbraco/Umbraco-CMS#19810 * Structure manager refactor implementation by @nielslyngsoe in umbraco/Umbraco-CMS#19970 * Moves icon dependencies to 'core' package.json by @iOvergaard in umbraco/Umbraco-CMS#20041 * Tiptap RTE: Migration to auto-enable new capabilities by @leekelleher in umbraco/Umbraco-CMS#20057 * Database creation/migration for UFM Label editor data-types by @leekelleher in umbraco/Umbraco-CMS#20055 * Workspace View Manifest Overrides by @nielslyngsoe in umbraco/Umbraco-CMS#20033 * Property Editors: Add Missing Property Editor fallback by @lauraneto in umbraco/Umbraco-CMS#19997 * Variants: Implements validation hints to the variant selector (closes #19953) by @iOvergaard in umbraco/Umbraco-CMS#20179 * Interaction Memory: Feature for picker modal state retention (#18305) by @madsrasmussen in umbraco/Umbraco-CMS#20159 * View Context: Implement browser title by @nielslyngsoe in umbraco/Umbraco-CMS#20145 * Icons: Add more heading icons by @bjarnef in umbraco/Umbraco-CMS#20242 * Tiptap RTE: Adds heading (h4-h6) toolbar buttons by @bjarnef in umbraco/Umbraco-CMS#20243 * Introduced sign providers for trees and implemented one for documents with schedule pending by @AndyButland in umbraco/Umbraco-CMS#19806 * Feature: Inflight Request Cache for Document Types and Data Types by @madsrasmussen in umbraco/Umbraco-CMS#19956 * Feature: Redirect to the last visited path when navigating between sections by @madsrasmussen in umbraco/Umbraco-CMS#20084 * Introducing signs to variants by @NillasKA in umbraco/Umbraco-CMS#20053 * Add Vietnamese to UI culture by @NguyenThuyLan in umbraco/Umbraco-CMS#20061 ### 🐛 Bug Fixes * Fixed behaviour on database cache rebuild to update only for requested content types by @AndyButland in umbraco/Umbraco-CMS#19905 ... (truncated) ## 16.3.0-rc4 ## What's Changed in 16.3.0-rc4 ### 🚤 Performance * Performance: Added request cache to media type retrieval in media picker validation, resolving performance regression in validate and save by @AndyButland in umbraco/Umbraco-CMS#20405 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.0-rc3...release-16.3.0-rc4 ## What's Changed in 16.3.0-rc3 ### 🐛 Bug Fixes * Hybrid cache: Check for `ContentCacheNode` instead of object on exists for hybrid cache to ensure correct deserialization (closes #20352) by @AndyButland in umbraco/Umbraco-CMS#20383 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.0-rc2...release-16.3.0-rc3 ## What's Changed in 16.3.0-rc2 ### 🐛 Bug Fixes * Caching: Fixes regression of the caching of null representations for missing dictionary items (closes #20336) by @AndyButland in umbraco/Umbraco-CMS#20349 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.0-rc...release-16.3.0-rc2 ## What's Changed Since The Last Release (16.2.0) ### 🙌 Notable Changes - Testing encouraged and appreciated! * Feature: Client Cache for Document Type and Data Type Detail Models by @madsrasmussen in umbraco/Umbraco-CMS#19904 * Feature: Client Cache for Document Item Models by @madsrasmussen in umbraco/Umbraco-CMS#19923 * Feature: Add client runtime cache for all item endpoints by @madsrasmussen in umbraco/Umbraco-CMS#19960 * Tiptap RTE: Unbundled "Rich Text Essentials" - Toggle basics on/off per data type by @leekelleher in umbraco/Umbraco-CMS#20042 ### 🏠 Internal * build(deps-dev): bump vite from v6 to v7 by @iOvergaard in umbraco/Umbraco-CMS#19974 ### 📦 Dependencies * Chore: upgrade typescript to 5.9 + other minors by @nielslyngsoe in umbraco/Umbraco-CMS#19914 * Bump vite-plugin-static-copy from 3.1.1 to 3.1.2 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#19969 * Bump @hey-api/openapi-ts to 0.81.1 by @iOvergaard in umbraco/Umbraco-CMS#19982 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#20114 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Login by @dependabot[bot] in umbraco/Umbraco-CMS#20181 * Dependencies: Update ImageSharp to latest patch releases (16) by @AndyButland in umbraco/Umbraco-CMS#20276 ### 🌈 Accessibility Improvements * Navigating the App Language Selector with the keyboard by @engijlr in umbraco/Umbraco-CMS#19887 * Profile: Corrected misleading button label by @OskarKruger in umbraco/Umbraco-CMS#20161 * Tiptap RTE: Adds accessibility attributes for RTE input by @OskarKruger in umbraco/Umbraco-CMS#20157 * Workspace Actions: set attributes on the right element for label to work by @nielslyngsoe in umbraco/Umbraco-CMS#20178 * Tags Property Editor: Remove tags with keyboard backspace/delete by @engijlr in umbraco/Umbraco-CMS#19892 * Accessibility changes for the top navbar tabs and settings tabs by @Abdjulaziz in umbraco/Umbraco-CMS#20107 * Update label for tree item caret to identify if open or closed by @OskarKruger in umbraco/Umbraco-CMS#20199 * Tiptap RTE: Adds hover and focus border input states by @OskarKruger in umbraco/Umbraco-CMS#20172 * Installer: Improves user accessibility by adding missing <form> elements and setting the right focus by @iOvergaard in umbraco/Umbraco-CMS#20265 ... (truncated) ## 16.3.0-rc3 ## What's Changed in 16.3.0-rc3 ### 🐛 Bug Fixes * Hybrid cache: Check for `ContentCacheNode` instead of object on exists for hybrid cache to ensure correct deserialization (closes #20352) by @AndyButland in umbraco/Umbraco-CMS#20383 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.0-rc2...release-16.3.0-rc3 ## What's Changed in 16.3.0-rc2 ### 🐛 Bug Fixes * Caching: Fixes regression of the caching of null representations for missing dictionary items (closes #20336) by @AndyButland in umbraco/Umbraco-CMS#20349 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.0-rc...release-16.3.0-rc2 ## What's Changed Since The Last Release (16.2.0) ### 🙌 Notable Changes - Testing encouraged and appreciated! * Feature: Client Cache for Document Type and Data Type Detail Models by @madsrasmussen in umbraco/Umbraco-CMS#19904 * Feature: Client Cache for Document Item Models by @madsrasmussen in umbraco/Umbraco-CMS#19923 * Feature: Add client runtime cache for all item endpoints by @madsrasmussen in umbraco/Umbraco-CMS#19960 * Tiptap RTE: Unbundled "Rich Text Essentials" - Toggle basics on/off per data type by @leekelleher in umbraco/Umbraco-CMS#20042 ### 🏠 Internal * build(deps-dev): bump vite from v6 to v7 by @iOvergaard in umbraco/Umbraco-CMS#19974 ### 📦 Dependencies * Chore: upgrade typescript to 5.9 + other minors by @nielslyngsoe in umbraco/Umbraco-CMS#19914 * Bump vite-plugin-static-copy from 3.1.1 to 3.1.2 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#19969 * Bump @hey-api/openapi-ts to 0.81.1 by @iOvergaard in umbraco/Umbraco-CMS#19982 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#20114 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Login by @dependabot[bot] in umbraco/Umbraco-CMS#20181 * Dependencies: Update ImageSharp to latest patch releases (16) by @AndyButland in umbraco/Umbraco-CMS#20276 ### 🌈 Accessibility Improvements * Navigating the App Language Selector with the keyboard by @engijlr in umbraco/Umbraco-CMS#19887 * Profile: Corrected misleading button label by @OskarKruger in umbraco/Umbraco-CMS#20161 * Tiptap RTE: Adds accessibility attributes for RTE input by @OskarKruger in umbraco/Umbraco-CMS#20157 * Workspace Actions: set attributes on the right element for label to work by @nielslyngsoe in umbraco/Umbraco-CMS#20178 * Tags Property Editor: Remove tags with keyboard backspace/delete by @engijlr in umbraco/Umbraco-CMS#19892 * Accessibility changes for the top navbar tabs and settings tabs by @Abdjulaziz in umbraco/Umbraco-CMS#20107 * Update label for tree item caret to identify if open or closed by @OskarKruger in umbraco/Umbraco-CMS#20199 * Tiptap RTE: Adds hover and focus border input states by @OskarKruger in umbraco/Umbraco-CMS#20172 * Installer: Improves user accessibility by adding missing <form> elements and setting the right focus by @iOvergaard in umbraco/Umbraco-CMS#20265 * Allow open split view using the keyboard by @engijlr in umbraco/Umbraco-CMS#19927 ### 🚀 New Features * Update dotnet new umbraco-extension template with newer @hey-api/openapi-ts by @warrenbuckley in umbraco/Umbraco-CMS#19825 * Workspace view navigation context by @nielslyngsoe in umbraco/Umbraco-CMS#19255 * Add timestamps to cache entries and server events by @madsrasmussen in umbraco/Umbraco-CMS#19976 * Block workspace view validation badges by @nielslyngsoe in umbraco/Umbraco-CMS#19987 * Section Sidebar Menu Expansion by @madsrasmussen in umbraco/Umbraco-CMS#19810 * Structure manager refactor implementation by @nielslyngsoe in umbraco/Umbraco-CMS#19970 ... (truncated) ## 16.3.0-rc2 ## What's Changed in 16.3.0-rc2 ### 🐛 Bug Fixes * Caching: Fixes regression of the caching of null representations for missing dictionary items (closes #20336) by @AndyButland in umbraco/Umbraco-CMS#20349 **Full Changelog**: umbraco/Umbraco-CMS@release-16.3.0-rc...release-16.3.0-rc2 ## What's Changed Since The Last Release (16.2.0) ### 🙌 Notable Changes - Testing encouraged and appreciated! * Feature: Client Cache for Document Type and Data Type Detail Models by @madsrasmussen in umbraco/Umbraco-CMS#19904 * Feature: Client Cache for Document Item Models by @madsrasmussen in umbraco/Umbraco-CMS#19923 * Feature: Add client runtime cache for all item endpoints by @madsrasmussen in umbraco/Umbraco-CMS#19960 * Tiptap RTE: Unbundled "Rich Text Essentials" - Toggle basics on/off per data type by @leekelleher in umbraco/Umbraco-CMS#20042 ### 🏠 Internal * build(deps-dev): bump vite from v6 to v7 by @iOvergaard in umbraco/Umbraco-CMS#19974 ### 📦 Dependencies * Chore: upgrade typescript to 5.9 + other minors by @nielslyngsoe in umbraco/Umbraco-CMS#19914 * Bump vite-plugin-static-copy from 3.1.1 to 3.1.2 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#19969 * Bump @hey-api/openapi-ts to 0.81.1 by @iOvergaard in umbraco/Umbraco-CMS#19982 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#20114 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Login by @dependabot[bot] in umbraco/Umbraco-CMS#20181 * Dependencies: Update ImageSharp to latest patch releases (16) by @AndyButland in umbraco/Umbraco-CMS#20276 ### 🌈 Accessibility Improvements * Navigating the App Language Selector with the keyboard by @engijlr in umbraco/Umbraco-CMS#19887 * Profile: Corrected misleading button label by @OskarKruger in umbraco/Umbraco-CMS#20161 * Tiptap RTE: Adds accessibility attributes for RTE input by @OskarKruger in umbraco/Umbraco-CMS#20157 * Workspace Actions: set attributes on the right element for label to work by @nielslyngsoe in umbraco/Umbraco-CMS#20178 * Tags Property Editor: Remove tags with keyboard backspace/delete by @engijlr in umbraco/Umbraco-CMS#19892 * Accessibility changes for the top navbar tabs and settings tabs by @Abdjulaziz in umbraco/Umbraco-CMS#20107 * Update label for tree item caret to identify if open or closed by @OskarKruger in umbraco/Umbraco-CMS#20199 * Tiptap RTE: Adds hover and focus border input states by @OskarKruger in umbraco/Umbraco-CMS#20172 * Installer: Improves user accessibility by adding missing <form> elements and setting the right focus by @iOvergaard in umbraco/Umbraco-CMS#20265 * Allow open split view using the keyboard by @engijlr in umbraco/Umbraco-CMS#19927 ### 🚀 New Features * Update dotnet new umbraco-extension template with newer @hey-api/openapi-ts by @warrenbuckley in umbraco/Umbraco-CMS#19825 * Workspace view navigation context by @nielslyngsoe in umbraco/Umbraco-CMS#19255 * Add timestamps to cache entries and server events by @madsrasmussen in umbraco/Umbraco-CMS#19976 * Block workspace view validation badges by @nielslyngsoe in umbraco/Umbraco-CMS#19987 * Section Sidebar Menu Expansion by @madsrasmussen in umbraco/Umbraco-CMS#19810 * Structure manager refactor implementation by @nielslyngsoe in umbraco/Umbraco-CMS#19970 * Moves icon dependencies to 'core' package.json by @iOvergaard in umbraco/Umbraco-CMS#20041 * Tiptap RTE: Migration to auto-enable new capabilities by @leekelleher in umbraco/Umbraco-CMS#20057 * Database creation/migration for UFM Label editor data-types by @leekelleher in umbraco/Umbraco-CMS#20055 * Workspace View Manifest Overrides by @nielslyngsoe in umbraco/Umbraco-CMS#20033 * Property Editors: Add Missing Property Editor fallback by @lauraneto in umbraco/Umbraco-CMS#19997 * Variants: Implements validation hints to the variant selector (closes #19953) by @iOvergaard in umbraco/Umbraco-CMS#20179 * Interaction Memory: Feature for picker modal state retention (#18305) by @madsrasmussen in umbraco/Umbraco-CMS#20159 * View Context: Implement browser title by @nielslyngsoe in umbraco/Umbraco-CMS#20145 ... (truncated) ## 16.3.0-rc <!-- Release notes generated using configuration in .github/release.yml at release-16.3.0-rc --> ## What's Changed ### 🙌 Notable Changes - Testing encouraged and appreciated! * Feature: Client Cache for Document Type and Data Type Detail Models by @madsrasmussen in umbraco/Umbraco-CMS#19904 * Feature: Client Cache for Document Item Models by @madsrasmussen in umbraco/Umbraco-CMS#19923 * Feature: Add client runtime cache for all item endpoints by @madsrasmussen in umbraco/Umbraco-CMS#19960 * Tiptap RTE: Unbundled "Rich Text Essentials" - Toggle basics on/off per data type by @leekelleher in umbraco/Umbraco-CMS#20042 ### 🏠 Internal * build(deps-dev): bump vite from v6 to v7 by @iOvergaard in umbraco/Umbraco-CMS#19974 ### 📦 Dependencies * Chore: upgrade typescript to 5.9 + other minors by @nielslyngsoe in umbraco/Umbraco-CMS#19914 * Bump vite-plugin-static-copy from 3.1.1 to 3.1.2 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#19969 * Bump @hey-api/openapi-ts to 0.81.1 by @iOvergaard in umbraco/Umbraco-CMS#19982 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Client by @dependabot[bot] in umbraco/Umbraco-CMS#20114 * Bump vite from 7.1.3 to 7.1.5 in /src/Umbraco.Web.UI.Login by @dependabot[bot] in umbraco/Umbraco-CMS#20181 * Dependencies: Update ImageSharp to latest patch releases (16) by @AndyButland in umbraco/Umbraco-CMS#20276 ### 🌈 Accessibility Improvements * Navigating the App Language Selector with the keyboard by @engijlr in umbraco/Umbraco-CMS#19887 * Profile: Corrected misleading button label by @OskarKruger in umbraco/Umbraco-CMS#20161 * Tiptap RTE: Adds accessibility attributes for RTE input by @OskarKruger in umbraco/Umbraco-CMS#20157 * Workspace Actions: set attributes on the right element for label to work by @nielslyngsoe in umbraco/Umbraco-CMS#20178 * Tags Property Editor: Remove tags with keyboard backspace/delete by @engijlr in umbraco/Umbraco-CMS#19892 * Accessibility changes for the top navbar tabs and settings tabs by @Abdjulaziz in umbraco/Umbraco-CMS#20107 * Update label for tree item caret to identify if open or closed by @OskarKruger in umbraco/Umbraco-CMS#20199 * Tiptap RTE: Adds hover and focus border input states by @OskarKruger in umbraco/Umbraco-CMS#20172 * Installer: Improves user accessibility by adding missing <form> elements and setting the right focus by @iOvergaard in umbraco/Umbraco-CMS#20265 * Allow open split view using the keyboard by @engijlr in umbraco/Umbraco-CMS#19927 ### 🚀 New Features * Update dotnet new umbraco-extension template with newer @hey-api/openapi-ts by @warrenbuckley in umbraco/Umbraco-CMS#19825 * Workspace view navigation context by @nielslyngsoe in umbraco/Umbraco-CMS#19255 * Add timestamps to cache entries and server events by @madsrasmussen in umbraco/Umbraco-CMS#19976 * Block workspace view validation badges by @nielslyngsoe in umbraco/Umbraco-CMS#19987 * Section Sidebar Menu Expansion by @madsrasmussen in umbraco/Umbraco-CMS#19810 * Structure manager refactor implementation by @nielslyngsoe in umbraco/Umbraco-CMS#19970 * Moves icon dependencies to 'core' package.json by @iOvergaard in umbraco/Umbraco-CMS#20041 * Tiptap RTE: Migration to auto-enable new capabilities by @leekelleher in umbraco/Umbraco-CMS#20057 * Database creation/migration for UFM Label editor data-types by @leekelleher in umbraco/Umbraco-CMS#20055 * Workspace View Manifest Overrides by @nielslyngsoe in umbraco/Umbraco-CMS#20033 * Property Editors: Add Missing Property Editor fallback by @lauraneto in umbraco/Umbraco-CMS#19997 * Variants: Implements validation hints to the variant selector (closes #19953) by @iOvergaard in umbraco/Umbraco-CMS#20179 * Interaction Memory: Feature for picker modal state retention (#18305) by @madsrasmussen in umbraco/Umbraco-CMS#20159 * View Context: Implement browser title by @nielslyngsoe in umbraco/Umbraco-CMS#20145 * Icons: Add more heading icons by @bjarnef in umbraco/Umbraco-CMS#20242 * Tiptap RTE: Adds heading (h4-h6) toolbar buttons by @bjarnef in umbraco/Umbraco-CMS#20243 * Introduced sign providers for trees and implemented one for documents with schedule pending by @AndyButland in umbraco/Umbraco-CMS#19806 * Feature: Inflight Request Cache for Document Types and Data Types by @madsrasmussen in umbraco/Umbraco-CMS#19956 * Feature: Redirect to the last visited path when navigating between sections by @madsrasmussen in umbraco/Umbraco-CMS#20084 * Introducing signs to variants by @NillasKA in umbraco/Umbraco-CMS#20053 * Add Vietnamese to UI culture by @NguyenThuyLan in umbraco/Umbraco-CMS#20061 ... (truncated) Commits viewable in [compare view](umbraco/Umbraco-CMS@release-16.2.0...release-16.3.4). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> > **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days. Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Prerequisites
Resolves: #19902
Description
The linked PR shows that saving document types is very slow when an installation has a lot of members. On the face of it this shouldn't have a significant impact.
I found it's happening as the logic in rebuilding the database cache doesn't look to be correct. According to the code comments on the interface for the parameters for each of the three types or content type, we should consider "null" as "don't do anything with this content type and "empty" to be to "rebuild everything for the content type", e.g.:
In the implementation though this was mixed up, and we were rebuilding everything on null inputs too.
Arguably this is behaviourally breaking but seems like this is a bug to fix - it resolves the issue and now the behaviour matches with the XML header comments on the interface.
I also found and fixed another bug where we were passing media type keys as document type keys in the
MediaCacheService. Likely didn't previously cause a problem as media would be fully rebuilt anyway due to the incorrect behaviour, but now that's amended it's important these are passed correctly too.Testing
You can test with a breakpoint in
DatabaseCacheRepository.Rebuild()and verifying that with these changes in place, we don't rebuild the member or media cache when saving a document type (or other combinations).