Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
It's a better approach than variable_set / variable_get.
I've talked with catch about this, and he agreed that by speed the order is:
hardcoded list > variable_get -> cache_set / cache_get.
Variable_get is slightly faster (we are talking nano-seconds here), but the fact that it can't be cleared without an update function when VBO is updated is problematic.
So, definitely +1 for cache_set / cache_get in D6.
In D7, I'll keep the hardcoded list. It's already there and working, no reason to touch it further.
Comments
Comment #1
infojunkieCommitted to latest dev.
Comment #2
infojunkie@bojanz, do you prefer this approach?
Comment #3
bojanz commentedIt's a better approach than variable_set / variable_get.
I've talked with catch about this, and he agreed that by speed the order is:
hardcoded list > variable_get -> cache_set / cache_get.
Variable_get is slightly faster (we are talking nano-seconds here), but the fact that it can't be cleared without an update function when VBO is updated is problematic.
So, definitely +1 for cache_set / cache_get in D6.
In D7, I'll keep the hardcoded list. It's already there and working, no reason to touch it further.