Updating fields will not reset the cached value. You can manually fix this by listening to the events and resetting the cache.
The helper will retrieve a value based on the "ENV" variable but will search in the database with the "ENV" and "TYPE" variable. So if you happen to use two types of settings you will mismatch the cached value. It will result in a blank value because the helper function won't search in the database as it already cached the other settings.
I have 2 issues with the helper function.
Updating fields will not reset the cached value. You can manually fix this by listening to the events and resetting the cache.
The helper will retrieve a value based on the "ENV" variable but will search in the database with the "ENV" and "TYPE" variable. So if you happen to use two types of settings you will mismatch the cached value. It will result in a blank value because the helper function won't search in the database as it already cached the other settings.
It should instead be;