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 PartialCached variant #1368
Comments
@bep, Ace parses a template file every time when the Ace caches parsed template files with these template names in a hash and if it finds a name in the hash, it bypasses parsing the template file, just returns a compile result which is a HTML file with Go template syntax. But this cache mechanism is only implemented in Anyway, Ace doesn't cache any rendering results. It just caches compiled result if |
|
I think the good people at Camunda are maintaining a version of Hugo with cached partials. There was some discussion about submitting a PR to get that functionality into main. See: https://github.com/camunda-third-party/hugo/tree/camunda particularly camunda-third-party@e15f8f5 :
|
- allows to specify that a partial should be cached after first evaluation, useful for static complex partials often used partials
Suggested API: partialCached(name string, context interface{}, variant ...string) template.HTML
|
Supports an optional variant string parameter so that a given partial will be cached based upon the name+variant. Fixes gohugoio#1368
Supports an optional variant string parameter so that a given partial will be cached based upon the name+variant. Fixes gohugoio#1368 Closes gohugoio#2552
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
See
http://discuss.gohugo.io/t/how-to-make-hugo-faster/1597/6
The above is an extract of a partial used on every page. It is an ineffective construct (slightly better in 0.15, I guess) and it gets really bad when page count goes up.
But it's static. And, although it is impossible to make a general assumption about how "cacheable" a given partial is (I think?), the user will know -- and should be able to say so.
So, for a site with 2000 pages, the above should only be needed to be processed once.
@tatsushid not sure how Ace include works in this area?
The text was updated successfully, but these errors were encountered: