:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


== Caching

Once a grid has been loaded for a domain class, this is cached internally by Apache Isis' internal meta model (in the `GridFacet` facet).

If running in prototype mode, any subsequent changes to the XML will be detected and the grid rebuilt.
This allows for dynamic reloading of layouts, providing a far faster feedback (eg if tweaking the UI while working with end-users).
Dynamic reloading is disabled in production mode.


== See also

This service is called by xref:refguide:applib:index/services/layout/LayoutService.adoc[LayoutService], exposed in the UI through `LayoutServiceMenu` (to download the layout XML as a zip file for all domain objects) and the xref:applib-classes:mixees-and-mixins.adoc#java-lang-object[downloadLayoutXml()] mixin (to download the layout XML for a single domain
object).

This service delegates to:

* to xref:refguide:applib:index/services/grid/GridLoaderService.adoc[GridLoaderService] to load a pre-existing layout for the domain class, if possible

* to xref:refguide:applib:index/services/grid/GridSystemService.adoc[GridSystemService] to normalize the grid with respect to Apache Isis' internal metamodel, in other words to ensure that all of the domain objects' properties, collections and actions are associated with regions of the grid.



