|
| __construct (protected int readonly int $quizid) |
| Create override_cache object and link to quiz.
|
|
| clear_for (?int $userid=null, ?int $groupid=null) |
| Clears the cache for the given user and/or group.
|
|
| clear_for_group (int $groupid) |
| Deletes the cached override data for a given group.
|
|
| clear_for_user (int $userid) |
| Deletes the cached override data for the given user.
|
|
| get_cached_group_override (int $groupid) |
| Returns the override value in the cache for the given group.
|
|
| get_cached_user_override (int $userid) |
| Returns the override value in the cache for the given user.
|
|
◆ __construct()
mod_quiz\local\override_cache::__construct |
( |
protected int readonly int | $quizid | ) |
|
Create override_cache object and link to quiz.
- Parameters
-
int | $quizid | The quiz to link this cache to |
- Parameters
-
$quizid | $quizid ID of quiz cache is being operated on * |
◆ clear_for()
mod_quiz\local\override_cache::clear_for |
( |
?int | $userid = null, |
|
|
?int | $groupid = null ) |
Clears the cache for the given user and/or group.
- Parameters
-
?int | $userid | user to delete data for, or null. |
?int | $groupid | group to delete data for, or null. |
◆ clear_for_group()
mod_quiz\local\override_cache::clear_for_group |
( |
int | $groupid | ) |
|
Deletes the cached override data for a given group.
- Parameters
-
int | $groupid | group to delete data for |
◆ clear_for_user()
mod_quiz\local\override_cache::clear_for_user |
( |
int | $userid | ) |
|
Deletes the cached override data for the given user.
- Parameters
-
int | $userid | user to delete data for |
◆ get_cache()
mod_quiz\local\override_cache::get_cache |
( |
| ) |
|
|
protected |
Returns the override cache.
- Return values
-
◆ get_cached_group_override()
mod_quiz\local\override_cache::get_cached_group_override |
( |
int | $groupid | ) |
|
Returns the override value in the cache for the given group.
- Parameters
-
int | $groupid | group to get cached override data for |
- Return values
-
?\stdClass | override value in the cache for the given group, or null if there is none. |
◆ get_cached_user_override()
mod_quiz\local\override_cache::get_cached_user_override |
( |
int | $userid | ) |
|
Returns the override value in the cache for the given user.
- Parameters
-
int | $userid | user to get cached override data for |
- Return values
-
?\stdClass | the override value in the cache for the given user, or null if there is none. |
◆ get_group_cache_key()
mod_quiz\local\override_cache::get_group_cache_key |
( |
int | $groupid | ) |
|
|
protected |
Returns group cache key.
- Parameters
-
- Return values
-
string | the group cache key |
◆ get_user_cache_key()
mod_quiz\local\override_cache::get_user_cache_key |
( |
int | $userid | ) |
|
|
protected |
Returns user cache key.
- Parameters
-
- Return values
-
◆ INVALIDATION_USERDATARESET
string const mod_quiz\local\override_cache::INVALIDATION_USERDATARESET = 'userdatareset' |
invalidation event used to purge data when reset_userdata is called, {
- See also
- cache_helper\purge_by_event()}
The documentation for this class was generated from the following file:
- mod/quiz/classes/local/override_cache.php