MDL-67020 Cache: Make locking work for local file caches

* Add new requirelockingbeforewrite flag for cache definitions
* Implement native locking in cachestore_file (leveraging
file_lock_factory).
This commit is contained in:
Mark Johnson
2022-10-20 11:31:33 +01:00
parent dcc7d7b8df
commit 045ee091da
12 changed files with 328 additions and 27 deletions
+5
View File
@@ -62,5 +62,10 @@ class cachestore_file_addinstance_form extends cachestore_addinstance_form {
$form->addElement('checkbox', 'asyncpurge', get_string('asyncpurge', 'cachestore_file'));
$form->setType('asyncpurge', PARAM_BOOL);
$form->addHelpButton('asyncpurge', 'asyncpurge', 'cachestore_file');
$form->addElement('text', 'lockwait', get_string('lockwait', 'cachestore_file'));
$form->setDefault('lockwait', 60);
$form->setType('lockwait', PARAM_INT);
$form->addHelpButton('lockwait', 'lockwait', 'cachestore_file');
}
}