MDL-38565 cache: session caches now function as expected
This change is a large change to the way sessions are handled within MUC after it was discovered that session did not function as expected when any store other than the default session store was being used. As part of this change the session loader has been largely customised in order to consolidate session data for the loader. The unit tests have also being greatly increased to provide better coverage for sessions.
This commit is contained in:
Vendored
+14
@@ -110,6 +110,11 @@ abstract class cache_store implements cache_store_interface {
|
||||
*/
|
||||
const SUPPORTS_NATIVE_TTL = 4;
|
||||
|
||||
/**
|
||||
* The cache is searchable by key.
|
||||
*/
|
||||
const IS_SEARCHABLE = 8;
|
||||
|
||||
// Constants for the modes of a cache store
|
||||
|
||||
/**
|
||||
@@ -307,6 +312,15 @@ abstract class cache_store implements cache_store_interface {
|
||||
return $this::get_supported_features() & self::SUPPORTS_NATIVE_TTL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the store instance is searchable.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_searchable() {
|
||||
return in_array('cache_is_searchable', class_implements($this));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a clone of this store instance ready to be initialised.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user