Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for #cached sections in Qute templates #919

Open
fbricon opened this issue Jul 31, 2023 · 1 comment
Open

Add support for #cached sections in Qute templates #919

fbricon opened this issue Jul 31, 2023 · 1 comment
Labels
enhancement New feature or request qute

Comments

@fbricon
Copy link
Collaborator

fbricon commented Jul 31, 2023

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?

@fbricon fbricon added enhancement New feature or request qute labels Jul 31, 2023
@mkouba
Copy link
Collaborator

mkouba commented Jul 31, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request qute
Projects
None yet
Development

No branches or pull requests

2 participants