Add Redis cache implementation (#397)

I'm using a hash function for the key just to make sure its length
doesn't get out of hand, otherwise the implementation is quite similar.
This commit is contained in:
Samantha Whitmore
2022-12-22 11:31:27 -06:00
committed by GitHub
parent ff03242fa0
commit 6bc8ae63ef
4 changed files with 317 additions and 190 deletions

View File

@@ -17,6 +17,7 @@ numpy = "^1"
faiss-cpu = {version = "^1", optional = true}
wikipedia = {version = "^1", optional = true}
elasticsearch = {version = "^8", optional = true}
redis = {version = "^4", optional = true}
manifest-ml = {version = "^0.0.1", optional = true}
spacy = {version = "^3", optional = true}
nltk = {version = "^3", optional = true}
@@ -39,6 +40,7 @@ black = "^22.10.0"
isort = "^5.10.1"
flake8 = "^6.0.0"
types-toml = "^0.10.8.1"
types-redis = "^4.3.21.6"
[tool.poetry.group.typing.dependencies]
mypy = "^0.991"