- // Do NOT check the cache as default values get cached, too. Otherwise loading a setting once
- // will mark it as existing in settings, even when it only exists in cache (and not on disk).
- create_qsettings;
- return s.contains(normKey);
+ if (!isKeyPersistedCached(normKey)) {
+ create_qsettings;
+ // Cache whether or not key exists on disk
+ // We can't cache key value as we don't know the default
+ setCacheKeyPersisted(normKey, s.contains(normKey));
+ }
+
+ return cacheKeyPersisted(normKey);