MOBILE-3833 user: Fix handler cache clear
parent
9987c3bcf9
commit
57532fd393
|
@ -397,8 +397,14 @@ export class CoreUserDelegateService extends CoreDelegate<CoreUserProfileHandler
|
|||
*/
|
||||
protected clearHandlerCache(courseId?: number, userId?: number): void {
|
||||
if (courseId && userId) {
|
||||
const cacheKey = this.getCacheKey(courseId, userId);
|
||||
|
||||
Object.keys(this.enabledHandlers).forEach((name) => {
|
||||
delete this.enabledForUserCache[name][this.getCacheKey(courseId, userId)];
|
||||
const cache = this.enabledForUserCache[name];
|
||||
|
||||
if (cache) {
|
||||
delete cache[cacheKey];
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.enabledForUserCache = {};
|
||||
|
|
Loading…
Reference in New Issue