aboutsummaryrefslogtreecommitdiff
path: root/src/background/repositories/FindRepository.js
blob: 74ec9146b8706eab3ad0008838b566ca4e2c1f53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import MemoryStorage from '../infrastructures/MemoryStorage';

const FIND_KEYWORD_KEY = 'find-keyword';

export default class FindRepository {
  constructor() {
    this.cache = new MemoryStorage();
  }

  getKeyword() {
    return Promise.resolve(this.cache.get(FIND_KEYWORD_KEY));
  }

  setKeyword(keyword) {
    this.cache.set(FIND_KEYWORD_KEY, keyword);
    return Promise.resolve();
  }
}