aboutsummaryrefslogtreecommitdiff
path: root/src/background/repositories/FindRepository.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/background/repositories/FindRepository.js')
-rw-r--r--src/background/repositories/FindRepository.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/background/repositories/FindRepository.js b/src/background/repositories/FindRepository.js
new file mode 100644
index 0000000..74ec914
--- /dev/null
+++ b/src/background/repositories/FindRepository.js
@@ -0,0 +1,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();
+ }
+}
+