Merge pull request #12574 from nupplaphil/feat/keyvalue_storage

Introduce key-value storage
This commit is contained in:
Hypolite Petovan 2022-12-30 16:36:03 -05:00 committed by GitHub
commit bacf901d0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 674 additions and 118 deletions

View file

@ -624,7 +624,7 @@ class Contact
public static function getPublicAndUserContactID(int $cid, int $uid): array
{
// We have to use the legacy function as long as the post update hasn't finished
if (DI::config()->get('system', 'post_update_version') < 1427) {
if (DI::keyValue()->get('post_update_version') < 1427) {
return self::legacyGetPublicAndUserContactID($cid, $uid);
}

View file

@ -2145,7 +2145,7 @@ class GServer
*/
private static function discoverFederation()
{
$last = DI::config()->get('poco', 'last_federation_discovery');
$last = DI::keyValue()->get('poco_last_federation_discovery');
if ($last) {
$next = $last + (24 * 60 * 60);
@ -2189,7 +2189,7 @@ class GServer
}
}
DI::config()->set('poco', 'last_federation_discovery', time());
DI::keyValue()->set('poco_last_federation_discovery', time());
}
/**