static @NotNull TagResolver caching(final TagResolver.@NotNull WithoutArguments resolver) {
    if (resolver instanceof CachingTagResolver) {
      return resolver;
    } else {
      return new CachingTagResolver(Objects.requireNonNull(resolver, "resolver"));
    }
  }
Constructs a tag resolver capable of caching resolved tags.

<p>The resolver can return {@code null} to indicate it cannot resolve a placeholder.
Once a string to replacement mapping has been created, it will be cached to avoid
the cost of recreating the replacement.</p>

<p>Due to the complexity of handling lookups for tags with arguments, the built-in cache does not support anything but tags without arguments.</p>

@param resolver the resolver
@return the caching tag resolver
@since 4.10.0
text-minimessage/src/main/java/net/kyori/adventure/text/minimessage/tag/resolver/TagResolver.java