Home Forums General Issues Why does add_field always clear the cache? Reply To: Why does add_field always clear the cache?

  • This is very confusing. So here is what I am understanding is happening.

    The register acf group function is called. As WP / ACF doesn’t know if this field has been registered before or if it has changed, for good measure it is deleting the field set stored in object cache. Then it creates all the field again for this page load.

    This is madness. Object cache calls should never used to store data only used for a single page load. Persistent object caching is designed to keep data between user sessions. It the data is going to be created and deleted on the fly like this, a php / class level variable should used as it is none persistent.

    At the moment, these pointless deleting of objects in cache are resulting in for about 13% of my page load, every page load.