redhat-developer / quarkus-ls

Language server for Quarkus tooling
Eclipse Public License 2.0
43 stars 15 forks source link

Add support for #cached sections in Qute templates #919

Open fbricon opened 1 year ago

fbricon commented 1 year ago

According to https://quarkus.io/guides/qute-reference#cached-section, if io.quarkus:quarkus-cache is in the classpath, qute templates should automatically be able to use a {#cached} section, with an optional key attribute.

Currently, the #cached section is being shown with an error

Screenshot 2023-07-31 at 11 31 56

@mkouba is this another instance of synthetic bean usage?

mkouba commented 1 year ago

@mkouba is this another instance of synthetic bean usage?

No, {#cached} is a section registered here: https://github.com/quarkusio/quarkus/blob/main/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/CacheProcessor.java#L13-L21.

In general, any extension or even application code can register a custom section. See also https://quarkus.io/guides/qute-reference#engine-customization.