Orchard Harvest 2024 montage video, Orchard Dojo case study - This week in Orchard (27/09/2024)
Cache top-unread notifications in the navbar for better performance, and add AddSiteDisplayDriver, and AddPermissionProvider extensions are the topics for this week. Check out our post for an Orchard Harvest 2024 montage video and for a case study about how we migrated Orchard Dojo to Orchard Core!
Orchard Core updates
Cache top-unread notifications in the navbar for better performance
The Notifications module offers a comprehensive infrastructure for managing notifications effectively. It includes a centralized notification center and streamlined mechanisms for seamlessly dispatching notifications to users within the application. However, calculating the unread notifications on every request is costly on database servers. Mike Alhayek improved the performance by caching the unread notifications for the user by default. Also, we use compiled query to query the database to help SQL Server not generate an execution place on every query.
You can customize the default notification options through the configuration provider using the following settings:
"OrchardCore_Notifications": {
"TotalUnreadNotifications": 10,
"DisableNotificationHtmlBodySanitizer": false,
"CacheDurationInSeconds": 3600
}
- TotalUnreadNotifications: Specifies the maximum number of unread notifications displayed in the navigation bar. The default is 10.
- DisableNotificationHtmlBodySanitizer: Allows you to disable the default sanitization of the HtmlBody in notifications generated from workflows.
- CacheDurationInSeconds: Caches the top unread user notifications for performance optimization, with a default duration of 3.600 seconds. Can be adjusted or set to 0 to disable caching.
Add AddSiteDisplayDriver and AddPermissionProvider extensions
A new extension has been introduced to simplify the registration of site setting drivers. Instead of using service.AddScoped<IDisplayDriver<ISite>, CustomSettingsDisplayDriver>(), you can now register it with the more streamlined service.AddSiteDisplayDriver<CustomSettingsDisplayDriver>().
Another new extension has been introduced to simplify the registration of permission providers. Instead of using service.AddScoped<IPermissionProvider, CustomPermissionProvider>(), you can now register it with the more streamlined service.AddPermissionProvider<CustomPermissionProvider>().
News from the community
Orchard Harvest 2024 montage video
A huge thank you to everyone who attended Orchard Harvest 2024! It was a pleasure meeting so many talented individuals in person. We have created a little montage video from the latest Orchard Harvest conference from Las Vegas! If you haven't seen it yet, you can check it out on YouTube. Last week we summarized the happenings of the conference, if you haven't read it yet, you can find last week's This week in Orchard post here.
Another Lombiq site was improved: Orchard Dojo case study
We have a fair amount of experience with migrating different sites from Orchard 1 to Orchard Core. For example, we migrated Folkways. Last summer, we had a chance and time to use our knowledge on our main site, lombiq.com, and we also posted a case study about how we did it. After renewing and migrating lombiq.com to Orchard Core, our next bigger target was Orchard Dojo. With our new experiences from migrating lombiq.com, we started working on Dojo. And we can proudly say that by the end of this summer, the brand-new site of Orchard Dojo was ready to go. We mentioned it in the This week in Orchard series as well a few weeks ago. And now we also published the case study where we wanted to describe how we did the migration, and what tools and features we used during the process. Check out this case study here.
Suppose you are also planning to migrate your Orchard 1 website to Orchard Core, and want to read more details about how you could start to migrate your website and content, search no more. In that case, we have published a detailed article with some samples as well about how you could start and enjoy the numerous remarkable benefits of migrating to Orchard Core.
Orchard Dojo Newsletter
Lombiq's Orchard Dojo Newsletter has 467 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course.
Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here!