Conversation
|
@nickvergessen, thanks for your PR! By analyzing the history of the files in this pull request, we identified @butonic, @icewind1991 and @jakobsack to be potential reviewers. |
Agreed, the alternatives that come to my mind do not look better at all. |
|
A second idea I just had was to automatically invalidate the cache every x seconds, so when a config is get/set later than x seconds, the data is refetched before. The main problem I start seeing now is, that when two processes run for quite some time, and both write a config value, the later one will overwrite the config value of the first write with the old value it read... time to get rid of the stupid config file :/ |
|
What about checking for any file modification of the config file itself? Like |
|
Yeah however, then we should do it on every write and save the md5 in memcache or something |
Paradise for race conditions. Even without the latter scenario. |
|
What is the status of this? |
| if (time() > $endTime) { | ||
| if (time() > $endTime || | ||
| $config->getSystemValue('maintenance', false) || | ||
| $currentVersion !== $config->getSystemValue('version', '') |
There was a problem hiding this comment.
I'm pretty sure, that this will not work, because the config is already loaded and will still hold the old version.
Signed-off-by: Joas Schilling <coding@schilljs.com>
…tive Signed-off-by: Joas Schilling <coding@schilljs.com>
7cd7d0c to
9b860d6
Compare
Codecov Report
@@ Coverage Diff @@
## master #5172 +/- ##
============================================
+ Coverage 51.71% 54.14% +2.43%
+ Complexity 25672 22286 -3386
============================================
Files 1634 1379 -255
Lines 95813 85346 -10467
Branches 1382 1321 -61
============================================
- Hits 49550 46212 -3338
+ Misses 46263 39134 -7129
|
Ref #4978
Need a way to refresh the
OC\Config::$cachearray or to ignore it.The best option I see atm is to pipe a method
purgeConfigCachethrough AllConfig > SystemConfig > ConfigThe problem is currently we don't re-read the config file, so all this checking is useless...