mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Use LRU helper class for explicit filter cache
This commit is contained in:
parent
8f3326c8d4
commit
6087862521
1 changed files with 2 additions and 3 deletions
|
@ -3,13 +3,12 @@ import re
|
|||
import time
|
||||
import pickle
|
||||
import logging
|
||||
from copy import deepcopy
|
||||
|
||||
# External Packages
|
||||
import torch
|
||||
|
||||
# Internal Packages
|
||||
from src.utils.helpers import resolve_absolute_path
|
||||
from src.utils.helpers import LRU, resolve_absolute_path
|
||||
from src.utils.config import SearchType
|
||||
|
||||
|
||||
|
@ -26,7 +25,7 @@ class ExplicitFilter:
|
|||
self.entry_key = entry_key
|
||||
self.search_type = search_type
|
||||
self.word_to_entry_index = dict()
|
||||
self.cache = {}
|
||||
self.cache = LRU()
|
||||
|
||||
|
||||
def load(self, entries, regenerate=False):
|
||||
|
|
Loading…
Add table
Reference in a new issue