-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V15: Cache Seeding #17102
Merged
Merged
V15: Cache Seeding #17102
Conversation
This file contains 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
Co-authored-by: Elitsa Marinovska <[email protected]>
Co-authored-by: Ronald Barendse <[email protected]>
…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
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:
IIdKeyMap
is used too much, for instance when deleting, I've fixed this by implementingGetContentSourceAsync
with key instead of only id.ToContentCacheNode
where the templates were switched, so the published template was returned for unpublished content and vice versa.RefreshContentAsync
was called twice, once for the published, and once for draft, butRefreshContentAsync
refreshed both regardless, I've added a check onIsDraft
hereTesting
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
GetContentSourceAsync
in theDatabaseCacheRepository
and ensure that this is not hit when resolving the seeded items.