mirror of
https://github.com/bitwarden/browser
synced 2025-12-23 03:33:54 +00:00
Use Memory Storage directly in Session Sync (#4423)
* Use Memory Storage directly in Session Sync * Update apps/browser/src/decorators/session-sync-observable/browser-session.decorator.spec.ts Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com> * Fix up test Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
import {
|
||||
AbstractStorageService,
|
||||
MemoryStorageServiceInterface,
|
||||
} from "../abstractions/storage.service";
|
||||
import { AbstractMemoryStorageService } from "../abstractions/storage.service";
|
||||
|
||||
export class MemoryStorageService
|
||||
extends AbstractStorageService
|
||||
implements MemoryStorageServiceInterface
|
||||
{
|
||||
export class MemoryStorageService extends AbstractMemoryStorageService {
|
||||
private store = new Map<string, any>();
|
||||
|
||||
get<T>(key: string): Promise<T> {
|
||||
@@ -33,4 +27,8 @@ export class MemoryStorageService
|
||||
this.store.delete(key);
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
getBypassCache<T>(key: string): Promise<T> {
|
||||
return this.get<T>(key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user