Skip to content

Commit

Permalink
MDL-64719 cache: Implement purge_current_user() in \cache
Browse files Browse the repository at this point in the history
\cache::make() may return a cache_disabled subclass but callers, specifically
user/lib.php:user_create_user(), invoke \cache::purge_current_user() which was
only implemented by the cache_session subclass.  Added empty
\cache::purge_current_user() which subclasses can implement, i.e.
cache_session, or not, i.e. cache_disabled.
  • Loading branch information
Leon Stringer committed Apr 1, 2019
1 parent 0920f35 commit 36b6444
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cache/classes/loaders.php
Expand Up @@ -1284,6 +1284,13 @@ public static function compare_purge_tokens($tokena, $tokenb) {
return -1;
}
}

/**
* Subclasses may support purging cache of all data belonging to the
* current user.
*/
public function purge_current_user() {
}
}

/**
Expand Down

0 comments on commit 36b6444

Please sign in to comment.