Spaces:
Sleeping
Sleeping
Download app/core/cache.py from vara201/simple-rag: direct link, hf CLI and curl.
- Browser
- Download file 265 Bytes
-
https://huggingface.co/spaces/vara201/simple-rag/resolve/main/app/core/cache.py
- Command line
-
hf download hf://spaces/vara201/simple-rag/app/core/cache.py
-
curl -L -o cache.py https://huggingface.co/spaces/vara201/simple-rag/resolve/main/app/core/cache.py
265 Bytes
| from cachetools import ( | |
| TTLCache | |
| ) | |
| embedding_cache = TTLCache( | |
| maxsize=10000, | |
| ttl=86400 | |
| ) | |
| retrieval_cache = TTLCache( | |
| maxsize=5000, | |
| ttl=900 | |
| ) | |
| response_cache = TTLCache( | |
| maxsize=5000, | |
| ttl=300 | |
| ) | |
| user_cache_keys = {} |