Home › Forums › ACF PRO › Performance issues with hundreds of queries › Reply To: Performance issues with hundreds of queries
Really old post, sorry @kulturbanause, didn’t see you’re follow up back then. To clarify my previous comment, I don’t actually use the value returned from
$meta = get_post_meta($post_id);
instead I just use that function call for force WP to get every custom field for a post. Once that is done then I use get_field() and other ACF functions because the values are cached and the WP cache. It is just a way to reduce DB requests.
@kcalv, you could also use a persistent cache that can cache html fragments for this, or even the WP the WP Transients API https://codex.wordpress.org/Transients_API
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.