Skip to content

Commit c8eef1f

Browse files
authored
caching result of dense_encoder method (#2610)
1 parent cc7cc99 commit c8eef1f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vector_search/encoders/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
from functools import cache
2+
13
from django.conf import settings
24
from django.utils.module_loading import import_string
35

46

7+
@cache
58
def dense_encoder():
69
"""
710
Return the dense encoder based on settings

0 commit comments

Comments
 (0)