Skip to content

Commit

Permalink
MDL-61028 search: Clear search engine users cache after tests
Browse files Browse the repository at this point in the history
  • Loading branch information
David Monllao committed Apr 24, 2018
1 parent acaeb5e commit 26b86f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions search/classes/engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ public function get_user($userid) {
return self::$cachedusers[$userid];
}

/**
* Clears the users cache.
*
* @return null
*/
public static function clear_users_cache() {
self::$cachedusers = [];
}

/**
* Returns a search instance of the specified area checking internal caching.
*
Expand Down
1 change: 1 addition & 0 deletions search/classes/manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ public static function clear_static() {
static::$instance = null;

base_block::clear_static();
engine::clear_users_cache();
}

/**
Expand Down

0 comments on commit 26b86f3

Please sign in to comment.