Prechádzať zdrojové kódy

remove caching things

Khaleel Al-Adhami 3 mesiacov pred
rodič
commit
06b751f679
2 zmenil súbory, kde vykonal 2 pridanie a 27 odobranie
  1. 2 5
      reflex/components/base/bare.py
  2. 0 22
      reflex/vars/base.py

+ 2 - 5
reflex/components/base/bare.py

@@ -9,7 +9,7 @@ from reflex.components.tags import Tag
 from reflex.components.tags.tagless import Tagless
 from reflex.utils.imports import ParsedImportDict
 from reflex.vars import BooleanVar, ObjectVar, Var
-from reflex.vars.base import VarData, get_var_caching, set_var_caching
+from reflex.vars.base import VarData
 
 
 class Bare(Component):
@@ -160,10 +160,7 @@ class Bare(Component):
                 for component in var_data.components:
                     if isinstance(component, Component):
                         component._add_style_recursive(style, theme)
-        if get_var_caching():
-            set_var_caching(False)
-            str(new_self)
-            set_var_caching(True)
+
         return new_self
 
     def _get_vars(

+ 0 - 22
reflex/vars/base.py

@@ -148,28 +148,6 @@ def unwrap_reflex_callalbe(
     return args
 
 
-_VAR_CACHING = True
-
-
-def get_var_caching() -> bool:
-    """Get the var caching status.
-
-    Returns:
-        The var caching status.
-    """
-    return _VAR_CACHING
-
-
-def set_var_caching(value: bool):
-    """Set the var caching status.
-
-    Args:
-        value: The value to set the var caching status to.
-    """
-    global _VAR_CACHING
-    _VAR_CACHING = value
-
-
 @dataclasses.dataclass(
     eq=False,
     frozen=True,