aboutsummaryrefslogtreecommitdiff
path: root/src/background/repositories/find.js
blob: 9482e7856d54601bff33e0e907633273a0624e6d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import MemoryStorage from '../infrastructures/memory-storage';

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) {
    return this.cache.set(FIND_KEYWORD_KEY, keyword);
  }
}