Conversation
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
…into v15/feature/update-to-dotnet-9
…v15/QA/hybrid-caching-tests # Conflicts: # Directory.Packages.props # src/Umbraco.Core/Models/CacheSettings.cs # src/Umbraco.PublishedCache.HybridCache/DependencyInjection/UmbracoBuilderExtensions.cs # src/Umbraco.PublishedCache.HybridCache/NotificationHandlers/SeedingNotificationHandler.cs # src/Umbraco.PublishedCache.HybridCache/Persistence/DatabaseCacheRepository.cs # src/Umbraco.PublishedCache.HybridCache/Persistence/IDatabaseCacheRepository.cs # src/Umbraco.PublishedCache.HybridCache/Services/DocumentCacheService.cs # src/Umbraco.PublishedCache.HybridCache/Services/IDocumentCacheService.cs # tests/Umbraco.Tests.Common/Builders/ContentEditingBuilder.cs # tests/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTestWithContentEditing.cs # tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/DocumentHybridCacheDocumentTypeTests.cs # tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/DocumentHybridCacheMockTests.cs # tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/DocumentHybridCachePropertyTest.cs # tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/DocumentHybridCacheScopeTests.cs # tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/DocumentHybridCacheTests.cs # tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/DocumentHybridCacheVariantsTests.cs # tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/MediaHybridCacheTests.cs # tests/Umbraco.Tests.Integration/Umbraco.PublishedCache.HybridCache/MemberHybridCacheTests.cs
…eeding' into v15/QA/hybrid-caching-tests
…v15/QA/hybrid-caching-tests
…eeding' into v15/QA/hybrid-caching-tests
V15 QA hybrid caching integration tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement cache seeding for Document and Media cache, enable seeded content to remain pinned, and fix various issues and todos.
Documents and media can both be seeded with a breadth-first search, there's been added new app settings for both to specify how many nodes should be seeded.
For documents, you can also seed a document type basis.
I found a couple of issues as well when working on this:
IIdKeyMapis used too much, for instance when deleting, I've fixed this by implementingGetContentSourceAsyncwith key instead of only id.ToContentCacheNodewhere the templates were switched, so the published template was returned for unpublished content and vice versa.RefreshContentAsyncwas called twice, once for the published, and once for draft, butRefreshContentAsyncrefreshed both regardless, I've added a check onIsDrafthereTesting
Test that the expected nodes are seeded, either by setting a breakpoint in the seed methods, or ideally by setting up a level two cache as specified in #16938, this will then allow you to look in the created DB table to see if the expected ids are cached.
It's also possible to set a breakpoint in
GetContentSourceAsyncin theDatabaseCacheRepositoryand ensure that this is not hit when resolving the seeded items.