Fix caching bug in get_code_tree method
This commit is contained in:
parent
4d285000cf
commit
2f6a2f3efb
1 changed files with 1 additions and 2 deletions
|
|
@ -4,7 +4,6 @@ from typing import Any, ClassVar, Optional
|
||||||
|
|
||||||
from cachetools import TTLCache, cachedmethod
|
from cachetools import TTLCache, cachedmethod
|
||||||
from fastapi import HTTPException
|
from fastapi import HTTPException
|
||||||
|
|
||||||
from langflow.interface.custom.code_parser import CodeParser
|
from langflow.interface.custom.code_parser import CodeParser
|
||||||
from langflow.utils import validate
|
from langflow.utils import validate
|
||||||
|
|
||||||
|
|
@ -30,7 +29,7 @@ class Component:
|
||||||
for key, value in data.items():
|
for key, value in data.items():
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
|
|
||||||
@cachedmethod(operator.attrgetter("cache"))
|
@cachedmethod(cache=operator.attrgetter("cache"))
|
||||||
def get_code_tree(self, code: str):
|
def get_code_tree(self, code: str):
|
||||||
parser = CodeParser(code)
|
parser = CodeParser(code)
|
||||||
return parser.parse_code()
|
return parser.parse_code()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue