MDL-72837 core_cache: Add versioned cache support

Adds new set_versioned and get_versioned APIs to cache, which means you can
request a specific version from cache and it will not return an outdated
version.

This is important when using multi-layer-caches where a local cache might have
an outdated version of the cache, but the shared cache has a current version.
With this feature, the content of the cache does not have to be rebuilt, as
it will automatically retrieve it from the shared cache if necessary.
This commit is contained in:
sam marshall
2022-02-23 16:58:38 +00:00
parent 97778526cc
commit 8a0f706033
10 changed files with 935 additions and 27 deletions
+1 -1
View File
@@ -225,4 +225,4 @@ class cacheable_object_array extends ArrayObject implements cacheable_object {
$class = __CLASS__;
return new $class($result);
}
}
}