If needed then we may need to find a way that performs well (e.g. using Memcached/WANObjectCache with a check key that is purged whenever a survey is changed or something).
However from what I can see, no information from localisation cache influences the decision it is trying to make in onResourceLoaderRegisterModules, which is the call to isEnabled(). It's just that it parses the message in the class constructor instead of where it is needed.
Suggestions:
- Create the Message object in the constructor, but don't call text() yet.
- Change isInsecure to a lazy-initialised property with a getter method.