Adds base class for ContentService performance benchmarks with:
- RecordBenchmark() for timing capture
- MeasureAndRecord() with warmup support for non-destructive ops
- MeasureAndRecord<T>() with warmup for read-only ops returning values
- JSON output wrapped in [BENCHMARK_JSON] markers for extraction
- skipWarmup parameter for destructive operations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* sql column type map include dateonly and timeonly
* Split Mapper and add check null value
* Minor code tidy resolving a few warnings.
* add spaces
* clean code
---------
Co-authored-by: Lan Nguyen Thuy <lnt@umbraco.dk>
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Added integration tests for PropertyTypeUsageService and adjusted assert in management API permissions test.
* Commented or fixed management API integration tests verifying permissions where we were asserting on an error response.
* V16: Cache Version Mechanism (#19747)
* Add RepositoryCacheVersion table
* Add repository
* Add Cache version lock
* Add GetAll method to repository
* Add RepositoryCacheVersionService
* Remember to add lock in data creator
* Work my way out of constructor hell
This is why we use DI folks. 🤦
* Add checks to specific cache policies
* Fix migration
* Add to schema creator
* Fix database access
* Initialize the cache version on in memory miss
* Make cache version service internal
* Add tests
* Apply suggestions from code review
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Add missing obsoletions
* Prefer full name
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* fixed merge
* V16/feature/move last synced id to db (#19884)
* Foundation work for moving last synced id
* register manager and repo in dependency injection
* Fixing to make tests work
* Replacing the use of the old LastSyncedFileManager.cs with the new LastSyncedManager.cs
* Testing to delete out of sync id and old entries
* changing some stuff to please the reviewer.
* Inverted saving methods id check and fixed documentation mishaps
* Loadbalancing: Add Cache Sync service to allow us to roll forward isolated caches when backoffice is load balanced. (#20398)
* Split cache refreshers into internal and external caches
* Add obsolete constructor for CacheInstructionsPruningJob
* Add xml docs
* Move lastID management into CacheInstructionService
* Cache last synced ids in memory
* Lock when processing instructions
* Sync caches when out of sync
* Fix constructors for ICacheSyncService
* Cache version on request
* Register caches as synced when instructions are processed
* Rename CacheVersionAccessor to IRepositoryCacheVersionAccessor
* Set caches as synced before actually syncing the caches
* Set caches as synced before syncing, within scope, this should also lock the cache version from being written to whilst updating caches
* Only check version for backoffice requests
* Clear request cache when caches are syned
* Default to using NOOP cache version service
* Don't generate local identity in database server messenger anymore
* Fix ambiguous constructor
* Add helper method to switch to load balanced isolated caches
* Fix LastSyncedManagerTests
* Fix RepositoryCacheVersionServiceTests
* Fix DefaultCachePolicyTests
* Use correct constructor in FullDataSetRepositoryCachePolicy
* Minor cleanup
* Add XML docs
* Add more xml docs
* Apply suggestions from code review
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
---------
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* Fix migration plan
* fix tests
* Fix integration tests
* Fix changes from github review
* Move premigrations to v17
* Make lock constantws sequential
* Fix comment
* Make IRepositoryCacheVersionService and ICacheSyncService protected on EntityRepositoryBase
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Nicklas Kramer <nik@umbraco.dk>
Co-authored-by: NillasKA <kramernicklas@gmail.com>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
* First Go at the single block property editor based on blocklistpropertyeditor
* Add simalar tests to the blocklist editor
Also check whether either block of configured blocks can be picked and used from a data perspective
* WIP singleblock Valiation tests
* Finished first full pass off SingleBlock validation testing
* Typos, Future test function
* Restore accidently removed file
* Introduce propertyValueConverter
* Comment updates
* Add singleBlock renderer
* Textual improvements
Comment improvements, remove licensing in file
* Update DataEditorCount by 1 as we introduced a new one
* Align test naming
* Add ignored singleblock default renderer
* Enable SingleBlock Property Indexing
* Enable Partial value merging
* Fix indentation
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Removing obsoleted code from ApiMediaQueryService.cs
* Removing obsoleted code from ApiRichTextMarkupParserTests.cs
* Removing obsoleted code from ContentCacheRefresher.cs
* Removing obsoleted code from ContentFinderByUrlAlias.cs and adjusting its tests to use the new logic
* Removing obsoleted code from ContentFinderByUrl.cs & its dependencies
* Removing obsoleted code from ApiRichTextMarkupParserTests.cs
* Removing obsoleted code from DocumentCache.cs & its dependencies
* Removing obsoleted code from MediaCache.cs & its dependencies
* Removing obsoleted code from PublishedCacheBase.cs & its dependencies
* Removing obsoleted code from RenderNoContentController.cs and its tests
* Removing obsoleted code from UmbracoRouteValueTransformer.cs
* Removing obsoleted constructors from DefaultUrlProvider.cs
* Removing accidental bookmark
* Introducing a helper method to get the root keys in ApiMediaQueryService.cs
* Removing obsoleted code from Cache classes
* Removing unused imports
* Refactoring to meet the CR
* Added attribute to controller
* Fixing missing using statement
* Removing obsoleted constructor from ExternalLoginService.cs and making usages fit
* Removing obsoleted method from IContentTypeFilter.cs
* Removing obsoleted methods from IContentEditingService.cs
* Removing obosoleted code from DocumentUrlService.cs
* Removed obsoleted code from DataTypeService.cs
* Removed obsoleted code from PublishStatusService.cs
* Removing obsoleted code from the IContentPublishingService.cs and its dependencies. Also implementing a TODO in the service implementation
* Removing obsoleted code from IRelationService.cs
* Removing obsoleted code from ContentPublishingService.cs
* Removing obsoleted code from ContentEditingService.cs
* Removing obsoleted code from Constants-DataTypes.cs
* Removing obsoleted code from IAction.cs and its implementations
* Removing obsoleted code from IContentService.cs
* Removing obsoleted code from DomainUtilities.cs
* Removing obsoleted code from IIndexedEntitySearchService.cs and dependencies
* Removing obsoleted code from UrlProvider.cs
* Removing obsoleted code from AliasUrlProvider.cs
* Removing obsoleted code from ApiContentRouteBuilder.cs
* Removing obsoleted code from ApiPublishedContentCache.cs
* Removing obsoleted class TemplateQueryResult.cs
* Removing obsoleted code from ApiContentBuilder.cs
* Removing obsoleted code from HealthCheck.cs
* Removing obsoleted code from ContentTypeEditingService.cs
* Removing obsoleted code from NewDefaultUrlProvider.cs
* Removing obsoleted code from PublishedElementPropertyBase.cs
* Removing obsoleted code from WebhookRequestService.cs
* Bumping to obsolete in V18, due to usage in class that will be removed in V18
* Removing obsoleted code from PropertyValidationService.cs
* Removing obsoleted code from AddUnroutableContentWarningsWhenPublishingNotificationHandler.cs
* Removing obsoleted code from IMemberService.cs
* Removing obsoleted code from DocumentCache.cs
* Add support for programmatic creation of property types providing the data type key (#19720)
* Add support for programmatic creation of property types providing the data type key.
* Add integration tests
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Don't use Lazy
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Rename `IContentService.CreateContentFromBlueprint` to `CreateBlueprintFromContent`
In reality, this method is used by the core to create a blueprint from content, and not the other way around, which doesn't need new ids. This was causing confusion, so the old name has been marked as deprecated in favor of the new name. If developers want to create content from blueprints they should use `IContentBlueprintEditingService.GetScaffoldedAsync()` instead, which is what is used by the management api.
* Added integration tests to verify that new block ids are generated when creating content from a blueprint
* Return copy of the blueprint in `ContentBlueprintEditingService.GetScaffoldedAsync` instead of the blueprint itself
* Update CreateContentFromBlueprint xml docs to mention both replacement methods
* Fix tests for rich text blocks
* Small re-organization
* Adjusted tests that were still referencing `ContentService.CreateContentFromBlueprint`
* Add default implementation to new CreateBlueprintFromContent method
* Update tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentBlueprintEditingServiceTests.GetScaffold.cs
Co-authored-by: Andy Butland <abutland73@gmail.com>
---------
Co-authored-by: Andy Butland <abutland73@gmail.com>
* Fixed error with reflection on integration test configure builder attributes, so integration tests can be created outside of the Umbraco integration test project.
* Fix nullability
---------
Co-authored-by: mole <nikolajlauridsen@protonmail.ch>
* Introduce IsDocumentPublishedInAnyCulture
Sometimes we don't care about culture
* Check ancestor path when resolving cache items
* Fix tests
* Rebuild NavigationService
* Only set node if it has a published ancestor path
* Remove branch when unpublished
* Add tests
* Add seed test
* Consider published ancestor path when seeding documents
* Introduce MediaBreadthFirstKeyProviderTests
This is needed since the logic of document and media is no longer the same
* Remove unused services
* Move assert page to helper
* Add variant tests
* Add tests
* Filter keys in ContentTypeSeedKeyProvider
* Fix tests
* Add failing test showing refreshing issue
* Don't blow up if we can't resolve the node from navigation cache
Turns out that this can actually happen :D Should be fine to just return false
* Refactor cache refresher check
* Make NavigationQueryService service protected
* Add comment on how to refactor breadth first key provider
* Refactor if statement
* Don't allow create when there is validation errors
* Fix tests
* Add tests
* Fix last test
* Fix more tests
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Add a way to configure IUmbracobuilder on a per testcase basis
* New logic for invariantVariantMerging
* bugfix
* Undo formatting changes
* Undo more automatic formatting
* Last automatic formatting correction
* Cleanup ConfigureBuilderAttribute
* Made propertyEditor tests internal
* Only fetch single commit
* Hopefully fixes Nerdbank.GitVersioning.GitException: Shallow clone lacks the objects required to calculate version height. Use full clones or clones with a history at least as deep as the last version height resetting change.
* Do not checkout again
* More test pipeline
* Another attempt
* yet another attempt
* more attempts
* Revert "more attempts"
This reverts commit 5694d97ba620e90fdeea287936f58002f2a5ddba.
* Test without building backoffice and login explicitly
* Fix mem leak in integration tests
* Fixes sqlserver lock test
* Added new notification to hook in after the premigrations and use this to init different services.
* Force MaxDegreeOfParallelism to 1, while investigating scopes
* Tried some more workarounds
* Updated scopes and changed parallel to non parallel to ensure migration works
* Missing scope
* Make it parallel again - The secret is, the SuppressFlow needs to be when you create the task, but not on the await!.
* Fixed issue when DEBUG_SCOPES is not added to tests.
* Remove test exception
* Try build on ubuntu again, even that we know it can be stuck. Just a test to see if all tests pass
* Updated comment
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Add cache refresher
* make public as needed for serialization
* Use content type cache to get content type out
* Refactor to use ContentCacheNode model, that goes in the memory cache
* Remove content node kit as its not needed
* Implement tests for ensuring caching
* Implement better asserts
* Implement published property
* Refactor to use mapping
* Rename to document tests
* Update to test properties
* Create more tests
* Refactor mock tests into own file
* Update property test
* Fix published version of content
* Change default cache level to elements
* Refactor to always have draft
* Refactor to not use PublishedModelFactory
* Added tests
* Added and updated tests
* Fixed tests
* Don't return empty object with id
* More tests
* Added key
* Another key
* Refactor CacheService to be responsible for using the hybrid cache
* Use notification handler to remove deleted content from cache
* Add more tests for missing functions
* Implement missing methods
* Remove HasContent as it pertains to routing
* Fik up test
* formatting
* refactor variable names
* Implement variant tests
* Map all the published content properties
* Get item out of cache first, to assert updated
* Implement member cache
* Add member test
* Implement media cache
* Implement property tests for media tests
* Refactor tests to use extension method
* Add more media tests
* Refactor properties to no longer have element caching
* Don't use property cache level
* Start implementing seeding
* Only seed when main
* Add Immutable for performance
* Implement permanent seeding of content
* Implement cache settings
* Implement tests for seeding
* Update package version
* start refactoring nurepo
* Refactor so draft & published nodes are cached individually
* Refactor RefreshContent to take node instead of IContent
* Refactor media to also use cache nodes
* Remove member from repo as it isn't cached
* Refactor media to not include preview, as media has no draft
* create new benchmark project
* POC Integration benchmarks with custom api controllers
* Start implementing content picker tests
* Implement domain cache
* Rework content cache to implement interface
* Start implementing elements cache
* Implement published snapshot service
* Publish snapshot tests
* Use snapshot for elements cache
* Create test proving we don't clear cache when updating content picker
* Clear entire elements cache
* Remove properties from element cache, when content gets updated.
* Rename methods to async
* Refactor to use old cache interfaces instead of new ones
* Remove snapshot, as it is no longer needed
* Fix tests building
* Refactor domaincache to not have snapshots
* Delete benchmarks
* Delete benchmarks
* Add HybridCacheProject to Umbraco
* Add comment to route value transformer
* Implement is draft
* remove snapshot from property
* V15 updated the hybrid caching integration tests to use ContentEditingService (#16947)
* Added builder extension withParentKey
* Created builder with ContentEditingService
* Added usage of the ContentEditingService to SETUP
* Started using ContentEditingService builder in tests
* Updated builder extensions
* Fixed builder
* Clean up
* Clean up, not done
* Added Ids
* Remove entries from cache on delete
* Fix up seeding logic
* Don't register hybrid cache twice
* Change seeded entry options
* Update hybrid cache package
* Fix up published property to work with delivery api again
* Fix dependency injection to work with tests
* Fix naming
* Dont make caches nullable
* Make content node sealed
* Remove path and other unused from content node
* Remove hacky 2 phase ctor
* Refactor to actually set content templates
* Remove umbraco context
* Remove "HasBy" methods
* rename property data
* Delete obsolete legacy stuff
* Add todo for making expiration configurable
* Add todo in UmbracoContext
* Add clarifying comment in content factory
* Remove xml stuff from published property
* Fix according to review
* Make content type cache injectible
* Make content type cache injectible
* Rename to database cache repository
* Rename to document cache
* Add TODO
* Refactor to async
* Rename to async
* Make everything async
* Remove duplicate line from json schema
* Move Hybrid cache project
* Remove leftover file
* Refactor to use keys
* Refactor published content to no longer have content data, as it is on the node itself
* Refactor to member to use proper content node ctor
* Move tests to own folder
* Add immutable objects to property and content data for performance
* Make property data public
* Fix member caching to be singleton
* Obsolete GetContentType
* Remove todo
* Fix naming
* Fix lots of exposed errors due to scope test
* Add final scope tests
* Rename to document cache service
* Rename test files
* Create new doc type tests
* Add ignore to tests
* Start implementing refresh for content type save
* Clear contenttype cache when contenttype is updated
* Fix test
Teh contenttype is not upated unless the property is dirty
* Updated tests
* Added tests
* Use init for ContentSourceDto
* Startup of setup
* Fix get by key in PublishedContentTypeCache
* Remove ContentType from PublishedContentTypeCache when contenttype is deleted
* Created interfaces for the builder with the necessary properties
* Created builder for PropertyTypeContainer
* Created builder for PropertyTypeEditing
* Created builder for PropertyTypeValidationEditing
* Made adjustments to the builder
* Updated name of usage
* Commented out to test
* Cleaned up builders
* Updated integration test setup
* Moved tests
* Added interface
* Add IDocumentSeedKeyProvider and migrate existing logic to seed key provider
* Added functionality to the INavigationQueryService to get root keys
* Fixed issue with navigation
* Created helper to Convert a IContentType to ContentTypeUpdateModel
* Added interfaces
* Added builder
* Cleaned up builders and added fixes
* Added tests for PublishedContentTypeCache
* Applied changes in builder
* Add BreadthFirstKeyProvider
* Use ISet for seedkey providers
* Implement GetContentSource by key
* Seed the cache with keys provided by seed key providers
* Builder updates
* Test setup updates
* Updated tests
* Dont require contenttype keys for seeding
* Fix cache settings
* Don't inject cache settings into SeedingNotificationHandler
* Fix tests
* Use enlistment for setting updated cache item
* Pin seeded nodes for longer
* Fix BreadthFirstKeyProvider
* Fix ContentTypeSeedKeyProvider
* Fix tests
* Only seed published documents
* Only cache published if contentCacheNode is not draft
* Fix incorrect templateId
* Removed unnecessary setup
* initialized value
* Fixed template test
* Removed test
* Updated tests
* Removed code that was not used
* Removed unused cacheSettings
* Re-organize to support media cache seeding
* Add MediaBreadthFirstKeyProvider
* Seed media
* Don't use IdKeyMap when removing content from cache
* Don't clear IdKeyMap in DocumentCacheService
* Add unit tests
* Don't use IdKeyMap when deleting media
* Add default value to timespan
* Use cancellation tokens when doing loop
* Fixed Models Builder error
* Builder testing
* Media test
* Created builders
* Updated method from getByKey to getById to maintain structure
* Updated test setup
* Moved tests
* Cleaned up builders
* Added helper
* Added space
* Updated tests
* Cleaned setup
* Added tests for MediaTypes
* Uncommented tests
* Added builder extensions
* Added interfaces for builder methods
* Updated to use interface pattern
* Updated name
* Used builder
* Cleaned up test
* Added media scope tests
* Removed PropertyTypeModelBuilder
* moved PropertyTypeModelBuilder to PropertyTypeEditingBuilder
* Removed constructor
* Removed duplicate
* Fixed naming
* Reverted
* Removed space
* Added todos
* Removed only run on linux
* Commet out DocumentHybridCacheTemplateTest again
This is fixed in the release branch
* Update media when media type is updated
* Remove todo the tests pass now
---------
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Started work on service
* temp work
* temp commit
* Temp commit
* Added more routing logic
* Fixed tests
* Refactor and prepare for isdraft
* Work on drafts
* Fixed tests
* Move to enlistment to ensure caches is only updated on scope complete
* Clean up and handle null cultures
* Added functionality to the INavigationQueryService to get root keys
* Added migration
* Fixed issue with navigation
* Added migration
* Temp commit, move to cache refreshers.
* Fixed issues
* List urls
* fix build
* Fixed integration tests
* Refactor to create new content finder instead of changing the old
* rollback wrong commited line
* Clean up, and use docuemnt url service for index
* Fixed List endpoin
* Do not use Navigation service in methods intended by management api
* Fixed examine tests
* Make methods virtual
* Use domain from published request
* Use hybrid cache from new content finder
* Eliminate nucache usage
* Fixed issue with delivery api and url generation
* Fixed linux tests
* Added hybrid cache to all integration tests
* Update to dotnet 9 and update nuget packages
* Update umbraco code version
* Update Directory.Build.props
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
* Include preview version in pipeline
* update template projects
* update global json with specific version
* Update version.json to v15
* Rename TrimStart and TrimEnd to string specific
* Rename to Exact
* Update global.json
Co-authored-by: Ronald Barendse <ronald@barend.se>
* Remove includePreviewVersion
* Rename to trim exact
* Add new Hybridcache project
* Add tests
* Start implementing PublishedContent.cs
* Implement repository for content
* Refactor to use async everywhere
* Add cache refresher
* make public as needed for serialization
* Use content type cache to get content type out
* Refactor to use ContentCacheNode model, that goes in the memory cache
* Remove content node kit as its not needed
* Implement tests for ensuring caching
* Implement better asserts
* Implement published property
* Refactor to use mapping
* Rename to document tests
* Update to test properties
* Create more tests
* Refactor mock tests into own file
* Update property test
* Fix published version of content
* Change default cache level to elements
* Refactor to always have draft
* Refactor to not use PublishedModelFactory
* Added tests
* Added and updated tests
* Fixed tests
* Don't return empty object with id
* More tests
* Added key
* Another key
* Refactor CacheService to be responsible for using the hybrid cache
* Use notification handler to remove deleted content from cache
* Add more tests for missing functions
* Implement missing methods
* Remove HasContent as it pertains to routing
* Fik up test
* formatting
* refactor variable names
* Implement variant tests
* Map all the published content properties
* Get item out of cache first, to assert updated
* Implement member cache
* Add member test
* Implement media cache
* Implement property tests for media tests
* Refactor tests to use extension method
* Add more media tests
* Refactor properties to no longer have element caching
* Don't use property cache level
* Start implementing seeding
* Only seed when main
* Add Immutable for performance
* Implement permanent seeding of content
* Implement cache settings
* Implement tests for seeding
* Update package version
* start refactoring nurepo
* Refactor so draft & published nodes are cached individually
* Refactor RefreshContent to take node instead of IContent
* Refactor media to also use cache nodes
* Remove member from repo as it isn't cached
* Refactor media to not include preview, as media has no draft
* create new benchmark project
* POC Integration benchmarks with custom api controllers
* Start implementing content picker tests
* Implement domain cache
* Rework content cache to implement interface
* Start implementing elements cache
* Implement published snapshot service
* Publish snapshot tests
* Use snapshot for elements cache
* Create test proving we don't clear cache when updating content picker
* Clear entire elements cache
* Remove properties from element cache, when content gets updated.
* Rename methods to async
* Refactor to use old cache interfaces instead of new ones
* Remove snapshot, as it is no longer needed
* Fix tests building
* Refactor domaincache to not have snapshots
* Delete benchmarks
* Delete benchmarks
* Add HybridCacheProject to Umbraco
* Add comment to route value transformer
* Implement is draft
* remove snapshot from property
* V15 updated the hybrid caching integration tests to use ContentEditingService (#16947)
* Added builder extension withParentKey
* Created builder with ContentEditingService
* Added usage of the ContentEditingService to SETUP
* Started using ContentEditingService builder in tests
* Updated builder extensions
* Fixed builder
* Clean up
* Clean up, not done
* Added Ids
* Remove entries from cache on delete
* Fix up seeding logic
* Don't register hybrid cache twice
* Change seeded entry options
* Update hybrid cache package
* Fix up published property to work with delivery api again
* Fix dependency injection to work with tests
* Fix naming
* Dont make caches nullable
* Make content node sealed
* Remove path and other unused from content node
* Remove hacky 2 phase ctor
* Refactor to actually set content templates
* Remove umbraco context
* Remove "HasBy" methods
* rename property data
* Delete obsolete legacy stuff
* Add todo for making expiration configurable
* Add todo in UmbracoContext
* Add clarifying comment in content factory
* Remove xml stuff from published property
* Fix according to review
* Make content type cache injectible
* Make content type cache injectible
* Rename to database cache repository
* Rename to document cache
* Add TODO
* Refactor to async
* Rename to async
* Make everything async
* Remove duplicate line from json schema
* Move Hybrid cache project
* Remove leftover file
* Refactor to use keys
* Refactor published content to no longer have content data, as it is on the node itself
* Refactor to member to use proper content node ctor
* Move tests to own folder
* Add immutable objects to property and content data for performance
* Make property data public
* Fix member caching to be singleton
* Obsolete GetContentType
* Remove todo
* Fix naming
* Fix lots of exposed errors due to scope test
* Add final scope tests
* Rename to document cache service
* Rename test files
* Create new doc type tests
* Add ignore to tests
* Start implementing refresh for content type save
* Clear contenttype cache when contenttype is updated
* Fix test
Teh contenttype is not upated unless the property is dirty
* Updated tests
* Added tests
* Use init for ContentSourceDto
* Startup of setup
* Fix get by key in PublishedContentTypeCache
* Remove ContentType from PublishedContentTypeCache when contenttype is deleted
* Created interfaces for the builder with the necessary properties
* Created builder for PropertyTypeContainer
* Created builder for PropertyTypeEditing
* Created builder for PropertyTypeValidationEditing
* Made adjustments to the builder
* Updated name of usage
* Commented out to test
* Cleaned up builders
* Updated integration test setup
* Moved tests
* Added interface
* Add IDocumentSeedKeyProvider and migrate existing logic to seed key provider
* Added functionality to the INavigationQueryService to get root keys
* Fixed issue with navigation
* Created helper to Convert a IContentType to ContentTypeUpdateModel
* Added interfaces
* Added builder
* Cleaned up builders and added fixes
* Added tests for PublishedContentTypeCache
* Applied changes in builder
* Add BreadthFirstKeyProvider
* Use ISet for seedkey providers
* Implement GetContentSource by key
* Seed the cache with keys provided by seed key providers
* Builder updates
* Test setup updates
* Updated tests
* Dont require contenttype keys for seeding
* Fix cache settings
* Don't inject cache settings into SeedingNotificationHandler
* Fix tests
* Use enlistment for setting updated cache item
* Pin seeded nodes for longer
* Fix BreadthFirstKeyProvider
* Fix ContentTypeSeedKeyProvider
* Fix tests
* Only seed published documents
* Only cache published if contentCacheNode is not draft
* Fix incorrect templateId
* Removed unnecessary setup
* initialized value
* Fixed template test
* Removed test
* Updated tests
* Removed code that was not used
* Removed unused cacheSettings
* Re-organize to support media cache seeding
* Add MediaBreadthFirstKeyProvider
* Seed media
* Don't use IdKeyMap when removing content from cache
* Don't clear IdKeyMap in DocumentCacheService
* Add unit tests
* Don't use IdKeyMap when deleting media
* Add default value to timespan
* Use cancellation tokens when doing loop
* Fixed Models Builder error
---------
Co-authored-by: Zeegaan <skrivdetud@gmail.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Fix warnings SA1111, SA1028, SA1500, IDE1270 in Umbraco.Web.Website, and updated rules.
* Remove warnings: IDE0270: Null check can be simplified
* More SqlServer project warnings resolved
* CS0105 namespace appeared already
* Suppress warning until implementation:
#pragma warning disable CS0162 // Unreachable code detected
#pragma warning disable CS0618 // Type or member is obsolete
CS0162 remove unreachable code
SA1028 remove trailing whitespace
SA1106 no empty statements
CS1570 malformed XML
CS1572 corrected xml parameter
CS1573 param tag added
IDE0007 var not explicit
IDE0008 explicit not var
IDE0057 simplify substring
IDE0074 compound assignment
CA1825 array.empty
Down to 3479 warnings
* Update to dotnet 9 and update nuget packages
* Update umbraco code version
* Update Directory.Build.props
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
* Include preview version in pipeline
* update template projects
* update global json with specific version
* Update version.json to v15
* Rename TrimStart and TrimEnd to string specific
* Rename to Exact
* Update global.json
Co-authored-by: Ronald Barendse <ronald@barend.se>
* Remove includePreviewVersion
* Rename to trim exact
* Add new Hybridcache project
* Add tests
* Start implementing PublishedContent.cs
* Implement repository for content
* Refactor to use async everywhere
* Add cache refresher
* make public as needed for serialization
* Use content type cache to get content type out
* Refactor to use ContentCacheNode model, that goes in the memory cache
* Remove content node kit as its not needed
* Implement tests for ensuring caching
* Implement better asserts
* Implement published property
* Refactor to use mapping
* Rename to document tests
* Update to test properties
* Create more tests
* Refactor mock tests into own file
* Update property test
* Fix published version of content
* Change default cache level to elements
* Refactor to always have draft
* Refactor to not use PublishedModelFactory
* Added tests
* Added and updated tests
* Fixed tests
* Don't return empty object with id
* More tests
* Added key
* Another key
* Refactor CacheService to be responsible for using the hybrid cache
* Use notification handler to remove deleted content from cache
* Add more tests for missing functions
* Implement missing methods
* Remove HasContent as it pertains to routing
* Fik up test
* formatting
* refactor variable names
* Implement variant tests
* Map all the published content properties
* Get item out of cache first, to assert updated
* Implement member cache
* Add member test
* Implement media cache
* Implement property tests for media tests
* Refactor tests to use extension method
* Add more media tests
* Refactor properties to no longer have element caching
* Don't use property cache level
* Start implementing seeding
* Only seed when main
* Add Immutable for performance
* Implement permanent seeding of content
* Implement cache settings
* Implement tests for seeding
* Update package version
* start refactoring nurepo
* Refactor so draft & published nodes are cached individually
* Refactor RefreshContent to take node instead of IContent
* Refactor media to also use cache nodes
* Remove member from repo as it isn't cached
* Refactor media to not include preview, as media has no draft
* create new benchmark project
* POC Integration benchmarks with custom api controllers
* Start implementing content picker tests
* Implement domain cache
* Rework content cache to implement interface
* Start implementing elements cache
* Implement published snapshot service
* Publish snapshot tests
* Use snapshot for elements cache
* Create test proving we don't clear cache when updating content picker
* Clear entire elements cache
* Remove properties from element cache, when content gets updated.
* Rename methods to async
* Refactor to use old cache interfaces instead of new ones
* Remove snapshot, as it is no longer needed
* Fix tests building
* Refactor domaincache to not have snapshots
* Delete benchmarks
* Delete benchmarks
* Add HybridCacheProject to Umbraco
* Add comment to route value transformer
* Implement is draft
* remove snapshot from property
* V15 updated the hybrid caching integration tests to use ContentEditingService (#16947)
* Added builder extension withParentKey
* Created builder with ContentEditingService
* Added usage of the ContentEditingService to SETUP
* Started using ContentEditingService builder in tests
* Updated builder extensions
* Fixed builder
* Clean up
* Clean up, not done
* Added Ids
* Remove entries from cache on delete
* Fix up seeding logic
* Don't register hybrid cache twice
* Change seeded entry options
* Update hybrid cache package
* Fix up published property to work with delivery api again
* Fix dependency injection to work with tests
* Fix naming
* Dont make caches nullable
* Make content node sealed
* Remove path and other unused from content node
* Remove hacky 2 phase ctor
* Refactor to actually set content templates
* Remove umbraco context
* Remove "HasBy" methods
* rename property data
* Delete obsolete legacy stuff
* Add todo for making expiration configurable
* Add todo in UmbracoContext
* Add clarifying comment in content factory
* Remove xml stuff from published property
* Fix according to review
* Make content type cache injectible
* Make content type cache injectible
* Rename to database cache repository
* Rename to document cache
* Add TODO
* Refactor to async
* Rename to async
* Make everything async
* Remove duplicate line from json schema
* Move Hybrid cache project
* Remove leftover file
* Refactor to use keys
* Refactor published content to no longer have content data, as it is on the node itself
* Refactor to member to use proper content node ctor
* Move tests to own folder
* Add immutable objects to property and content data for performance
* Make property data public
* Fix member caching to be singleton
* Obsolete GetContentType
* Remove todo
* Fix naming
* Fix lots of exposed errors due to scope test
* Add final scope tests
* Rename to document cache service
* Rename test files
* Create new doc type tests
* Add ignore to tests
* Start implementing refresh for content type save
* Clear contenttype cache when contenttype is updated
* Fix test
Teh contenttype is not upated unless the property is dirty
* Use init for ContentSourceDto
* Fix get by key in PublishedContentTypeCache
* Remove ContentType from PublishedContentTypeCache when contenttype is deleted
* Update to preview 7
* Fix versions
* Increase timeout for sqlite integration tests
* Undo timeout increase
* Try and undo init change to ContentSourceDto
* That wasn't it chief
* Try and make DomainAndUrlsTests non NonParallelizable
* Update versions
* Only run cache tests on linux for now
---------
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Sven Geusens <sge@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
* Update integration test base class to verify that calls to ServiceDescriptor.ImplementationType are guarded for keyed services
* Fix unguarded calls to ServiceDescriptor.ImplementationType for keyed services
* Removes lots of files used by the old backoffice and that is not needed for the management api
* A little clean-up
---------
Co-authored-by: kjac <kja@umbraco.dk>
* Move magical route to management api
* Move auth around
* Remove "New" cookies, as they are no longer needed
* Move all installer related
* Remove BackOfficeServerVariables.cs and trees
* Move webhooks to management api
* Remove remainting controllers
* Remove last services
* Move preview to management api
* Remove mroe extensions
* Remove tours
* Remove old Auth handlers
* Remove server variables entirely
* Remove old backoffice controller
* Remove controllers namespace entirely
* Move rest of preview
* move last services
* Move language file extension
* Remove old backoffice entirely (Backoffice and Web.UI projects)
* Clean up unused security classes
* Fix up installer route
* Remove obsolete tests
* Fix up DI in integration test
* Add missing property mapping
* Move core mapping into core
* Add composers to integration test
* remove identity
* Fix up DI
* Outcomment failing test :)
* Fix up remaining test
* Update mapper
* Remove the actual project files
* Remove backoffice cs proj
* Remove old backoffice from yml
* Run belissima before login
* Remove caching
* Refactor file paths
* Remove belle from static assets
* Dont refer to old project in templates
* update gitignore
* Add missing files
* Remove install view as its no longer used
* Fix up failing test
* Remove outcommented code
* Update submodule to latest
* fix build
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
* Refactor OpenIddict for shared usage between APIs + implement member authentication and handling within the Delivery API
* Make SwaggerRouteTemplatePipelineFilter UI config overridable
* Enable token revocation + rename logout endpoint to signout
* Add default implementation of SwaggerGenOptions configuration for enabling Delivery API member auth in Swagger
* Correct notification handling when (un)protecting content
* Fixing integration test framework
* Cleanup test to not execute some composers twice
* Update paths to match docs
* Return Forbidden when a member is authorized but not allowed to access the requested resource
* Cleanup
* Rename RequestMemberService to RequestMemberAccessService
* Rename badly named variable
* Review comments
* Hide the auth controller from Swagger
* Remove semaphore
* Add security requirements for content API operations in Swagger
* Hide the back-office auth endpoints from Swagger
* Fix merge
* Update back-office API auth endpoint paths + add revoke and sign-out endpoints (as of now they do not exist, a separate task will fix that)
* Swap endpoint order to maintain backwards compat with the current login screen for new back-office (will be swapped back again to ensure correct .well-known endpoints, see FIXME comment)
* Make "items by IDs" endpoint support member auth
* Add 401 and 403 to "items by IDs" endpoint responses
---------
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Elitsa <elm@umbraco.dk>
* Add alias to document item response
* Add master template key to detailed model
* Add mater template key as optiona parameter to Scaffolding
* Check for duplicate alias when creating templates directly
* Clean
* Ensure integration tests creates templates with unique aliases
* Perform mapping in presentation factory
* Align the template services and API with the dictionary ones (use attempt pattern)
* A little controller clean-up
* Mimic old file service behavior, make unit tests happy
* Align CreateForContentTypeAsync return value with the rest of the TemplateService API
* Scaffold endpoint should no longer feature master templates
* Update the OpenAPI JSON
* Creating a FileProviderFactory for getting the package.manifest and grid.editors.config.js files through a file provider
* Collecting the package.manifest-s from different sources
* Searching different sources for grid.editors.config.js
* Using an IFileProvider to collect all tours
* Refactoring IconService.cs
* Typo
* Optimizations when looping through the file system
* Moving WebRootFileProviderFactory to Umbraco.Web.Common proj
* Removes double registering
* pluginLangFileSources includes the localPluginFileSources
* Comments
* Remove linq from foreach
* Change workflow for grid.editors.config.js so we check first physical file, then RCL, then Embedded
* Clean up
* Check if config dir exists
* Discover nested package.manifest files
* Fix IFileInfo.PhysicalPath check
* Revert 712810e1fd995720047832ee689f804185ea69d6 as that way files in content root are preferred over those in web root
* Adding comments
* Refactoring
* Remove PhysicalPath check
* Fix registration of WebRootFileProviderFactory
* Update language models to get and set manual name
* Save custom language name in controller
* Rewrite AngularJS language edit view and controller
* Cleanup language overview
* Remove icon from language overview
* Make styling of control group the same as properties
* Ensure both ISO code and culture name are set in language model
* Use new language model constructor
* Update tests to use new language constructor
* Update culture name in dictionary package export
* Use language name in dictionary
* Fix language nullability issues
* Cleanup GetAllCultures and added null checks
* Re-add obsolete constructors
* Make language name required and update Cypress test
* Fix routing/saveNewLanguages Cypress test
* Make language name optional (improved backwards compatibility)
Co-authored-by: Ronald Barendse <ronald@panoramastudios.nl>