Do you know that version 10.1 onwards, Sitecore is storing default items as resource files. This is an interesting update as the files on disk are binary-serialized item data using Google’s ProtoBuf specification – in this case using the ProtoBuf.Net library for .Net.
Why to store item as resource files?
Sitecore has lots of out-of-box items like sitecore/content/Home which are present in Sitecore databases. Sitecore has changed this approach to store these items on file system as resource files as ProtoBuf data to solve the complexity related to upgrading the Sitecore instances especially in containerized environments.
If you have an instance of Sitecore 10.1 or above running, you will find these below files. Default Sitecore items are part of these files now -
Some more related information on this -
- Due to default Sitecore items being stored in resource files and not in database now, rows in content databases are less and hence, publishing operations are much faster. There’s no need to ever publish an item that’s in the ProtoBuf data – because that’s on both your CM and CD servers. So publish operation has to read only the database rows that are left. Hence a “Republish all” operation now has lesser data to process – and is going to finish much faster.
- A side-effect of this model is that you cannot delete items which exist in resource files. You get an error dialog saying “Some of selected items are in resources and cannot be deleted”. But this should not impact as we rarely need to delete any of default Sitecore items
- Going forward, a similar approach can be followed by Sitecore modules too. For e.g. SXA 10.2 is going to store its default items in resource files
Comments
Post a Comment