diff --git a/environment_indicator.module b/environment_indicator.module index 7533f61..02e7df8 100644 --- a/environment_indicator.module +++ b/environment_indicator.module @@ -463,10 +463,11 @@ function environment_indicator_get_active() { * The altered environment. */ function environment_indicator_alter_and_cache($env) { - drupal_alter('environment_indicator_matched_indicator', $env); - - // Save it to the db cache. - cache_set('environment_indicator', $env); + // Only write to the cache if not already in the cache. + if (!cache_get('environment_indicator')) { + cache_set('environment_indicator', $env); + } + drupal_alter($env); return $env; }