Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Calls to taxonomy_get_tree() can get expensive on sites with large taxonomies. We can smartly cache the tree information required and avoid repeatedly calling it on every page view.
Comment | File | Size | Author |
---|---|---|---|
#3 | userpoints-cache_taxonomy_tree-2195893-2.patch | 2.25 KB | jrbeeman |
#1 | userpoints-cache_taxonomy_tree-2195893-1.patch | 1.77 KB | jrbeeman |
Comments
Comment #1
jrbeemanPatch attached that caches the tree upon the first call to userpoints_get_categories(). The cache is stored indefinitely and only regenerated upon saving or deleting a term in the related taxonomy vocabulary.
Comment #2
jrbeemanComment #3
jrbeemanMissed the definition of the constant in that last patch. Please ignore patch #1.