[wp-trac] [WordPress Trac] #45471: Allow caching of parse_blocks results
WordPress Trac
noreply at wordpress.org
Wed Jan 15 14:21:21 UTC 2025
#45471: Allow caching of parse_blocks results
--------------------------+-----------------------------
Reporter: joostdevalk | Owner: francina
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: Cache API | Version: 5.0
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses: performance
--------------------------+-----------------------------
Comment (by justlevine):
Related: https://core.trac.wordpress.org/ticket/49442
While it doesn't specifically handle caching, the existing of a
`parse_blocks` filter would make it straightforward to implement, as well
as provide a pathway to solve the issue that prompted this ticket - Core
does a lot of attribute manipulation when it's rendering (more so with
Block Supports), so if you need to get those attributes programmatically
there's no choice but to hit render_blocks() again. And if those _arent_
cached, then it's not just a performance issue; you also have to deal with
things like static `wp_unique_(prefixed)_id()` and other "fun" issues with
layout styles, modals, etc.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45471#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list