This is an automated email from the ASF dual-hosted git repository. reschke pushed a commit to branch SLING-12799 in repository https://gitbox.apache.org/repos/asf/sling-site.git
commit 5f57e2c6d73922835b0601b494a5998c405b26de Author: Julian Reschke <[email protected]> AuthorDate: Mon May 26 18:53:52 2025 +0100 SLING-12799: resource resolver - document jcr:content handling for aliases --- .../the-sling-engine/mappings-for-resource-resolution.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/jbake/content/documentation/the-sling-engine/mappings-for-resource-resolution.md b/src/main/jbake/content/documentation/the-sling-engine/mappings-for-resource-resolution.md index 431aa89ee..b6507033a 100644 --- a/src/main/jbake/content/documentation/the-sling-engine/mappings-for-resource-resolution.md +++ b/src/main/jbake/content/documentation/the-sling-engine/mappings-for-resource-resolution.md @@ -265,6 +265,8 @@ The String Interpolation works with any part of the etc-map tree. The property `sling:alias` may be set on any resource to indicate an alias name for the resource. For example the resource `/content/visitors` may have the `sling:alias` property set to `besucher` allowing the resource to be addressed in an URL as `/content/besucher` as well as the original path `/content/visitors`. The property `sling:alias` may have multiple values. The first value is used for outgoing mapping, i.e. is the *preferred name* used in links generated by Sling. +Note that `jcr:content` nodes are treated differently. Aliases specified on these nodes apply to the *parent* node. Setting alias properties both on `jcr:content` and the parent node is discouraged (and results in the alias lists of both nodes to be combined). + Aliases are roughly similar to POSIX hard links, restricted to simple names (no paths). The following characters are not allowed in `sling:alias` values: `/?#`. Using any of those characters somewhere in the value makes Sling disregard the alias mapping. In addition the aliases `.`, `..` and the empty string are invalid. Invalid aliases are logged with WARN level. @@ -273,7 +275,7 @@ The following characters are not allowed in `sling:alias` values: `/?#`. Using a In general, the number of aliases have a direct impact on the performance of the resource resolution - as basically all possible permutations of paths for a resource have to be tested against the incoming request path. By default a cache is used to speed up handling aliases during resolving resources. It is highly recommended to have this cache enabled to avoid slowing down request performance. However, the cache might have an impact on startup time and on the alias update time if the nu [...] -The cache can be disabled by setting the property `resource.resolver.optimize.alias.resolution` of the OSGi configuration `org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl` to `false`. Note that this is not recommended because of the aforementioned performance issues and also minor differences in behavior (see [SLING-12025](https://issues.apache.org/jira/browse/SLING-12025)). +The cache can be disabled by setting the property `resource.resolver.optimize.alias.resolution` of the OSGi configuration `org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl` to `false`. Note that this is not recommended because of the aforementioned performance issues and also differences in behavior with respect to `jcr:content` nodes (see [SLING-12025](https://issues.apache.org/jira/browse/SLING-12025)). ### Limitation of `sling:alias` for Principal with a limited access
