I'm trying to create a custom process, that works similar to reading config from appsettings.json when application starts. The list of settings are stored in umbraco content tree.
Let's say the setting is at
UmbracoContentRoot/Site-Settings
Under it, there's 3 setting item
Student
Book
Publication
When user visit a page with 'student' in the URL, the page will add a meta tag: meta name='page-type' content='student'
The issue here is that I do not want to read all settings under 'UmbracoContentRoot/Site-Settings' whenever a page loads, then compare the setting with page URL and decide which page-type it belongs to. This is very bad performance.
How could I read the setting items in umbraco at application level and cache it, or like put in a static class, just like reading the appsettings.json at start? And can retrieve the values whenever needed without the need to get the setting items in umbraco and loop through them for every page load?
I'd really appreciate if anyone can help :)))))