fix problem with layout cache and grid template
prepare further changes on config model