Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
Pygmales
/
hsg_rag_eea
like
1
Running
App
Files
Files
Fetching metadata from the HF Docker repository...
main
hsg_rag_eea
/
src
/
cache
/
utils.py
Pygmales
updated project version
5ff514f
19 days ago
raw
Copy download link
history
blame
Safe
200 Bytes
import
re
def
get_cache_key
(
key:
str
, language:
str
, session_id:
str
) ->
str
:
normalized_key = re.sub(
r'[^a-z0-9]'
,
''
, key.lower())
return
f"cache:
{session_id}
:
{language}
:
{normalized_key}
"