Home › Forums › Add-ons › Options Page › Cache ACF fields stored in the wp_options table › Reply To: Cache ACF fields stored in the wp_options table
While this will be hopefully be fixed/improved due to the autoloading options, if you have templates fetching a huge number of options fields like this you can build a caching system yourself – hook into the edit_category (or similar) filters; fetch all of the relevant fields for the page and cache them in an array in a single autoloaded option. That way all of the queries only need to be run when saving/creating/deleting a category, rather than on the frontend.
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!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.