Skip to content

Commit cfce6d2

Browse files
authored
fix: disable caching for user (#6198)
1 parent 922876f commit cfce6d2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/services/auth-manager.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ export default class AuthManagerService extends Service {
1919
@service
2020
bugTracker;
2121

22-
@service
23-
cache;
24-
2522
@computed('session.data.currentUserFallback.id', 'currentUserModel')
2623
get currentUser() {
2724
if (this.currentUserModel) {
@@ -67,7 +64,6 @@ export default class AuthManagerService extends Service {
6764
this.session.invalidate();
6865
this.set('currentUserModel', null);
6966
this.session.set('data.currentUserFallback', null);
70-
this.cache.clear();
7167
}
7268

7369
identify() {
@@ -143,7 +139,7 @@ export default class AuthManagerService extends Service {
143139
if (this.session.isAuthenticated) {
144140
if (this.session.data.currentUserFallback.id) {
145141
try {
146-
const user = await this.cache.findRecord('user', 'user', this.session.data.currentUserFallback.id);
142+
const user = await this.store.findRecord('user', this.session.data.currentUserFallback.id);
147143
this.set('currentUserModel', user);
148144
this.identify();
149145
} catch (e) {

0 commit comments

Comments
 (0)