Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add PartialCached variant #1368
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?
@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.
particularly camunda-third-party@e15f8f5 :