How to organize and cache additional data associated with terms?

I’d say your third option is the way to go.

Incidentally, why did you roll your own static cache in taxonomy_image_plugin_get_associations() instead of using the built-in WP_Cache API for that? Is there a reason wp_cache_get wouldn’t work here? Seems like using the WP object cache would optimize better when people do have caching plugins turned on.

Leave a Comment