{"record":{"id":"c89cc99ae127ba6e","repo":"reflex-dev/reflex","slug":"cannot-track-dependencies-without-caching","errorCode":null,"errorMessage":"Cannot track dependencies without caching.","messagePattern":"Cannot track dependencies without caching\\.","errorType":"exception","errorClass":"VarDependencyError","httpStatus":null,"severity":"error","filePath":"packages/reflex-base/src/reflex_base/vars/base.py","lineNumber":2984,"sourceCode":"        interval: Interval at which the computed var should be updated.\n        backend: Whether the computed var is a backend var.\n        **kwargs: additional attributes to set on the instance\n\n    Returns:\n        A ComputedVar instance.\n\n    Raises:\n        ValueError: If caching is disabled and an update interval is set.\n        VarDependencyError: If user supplies dependencies without caching.\n        ComputedVarSignatureError: If the getter function has more than one argument.\n    \"\"\"\n    if cache is False and interval is not None:\n        msg = \"Cannot set update interval without caching.\"\n        raise ValueError(msg)\n\n    if cache is False and (deps is not None or auto_deps is False):\n        msg = \"Cannot track dependencies without caching.\"\n        raise VarDependencyError(msg)\n\n    if fget is not None:\n        sign = inspect.signature(fget)\n        if len(sign.parameters) != 1:\n            raise ComputedVarSignatureError(fget.__name__, signature=str(sign))\n\n        if inspect.iscoroutinefunction(fget):\n            computed_var_cls = AsyncComputedVar\n        else:\n            computed_var_cls = ComputedVar\n        return computed_var_cls(\n            fget,\n            initial_value=initial_value,\n            cache=cache,\n            deps=deps,\n            auto_deps=auto_deps,\n            interval=interval,\n            backend=backend,","sourceCodeStart":2966,"sourceCodeEnd":3002,"githubUrl":"https://github.com/reflex-dev/reflex/blob/45b8ed5ab735f8a56bbb09a42384f030eb0208e7/packages/reflex-base/src/reflex_base/vars/base.py#L2966-L3002","documentation":"Raised when dependencies (deps=[...] or auto_deps=False) are supplied for a computed var while cache=False. Dependency tracking only applies to cached computed vars, so reflex rejects the combination.","triggerScenarios":"@rx.memo(cache=False, deps=[State.foo]) or passing auto_deps=False with cache=False to rx.computed.","commonSituations":"Migrating from manual deps to automatic dependency tracking and leaving cache=False behind; mixing legacy arg patterns in one decorator.","solutions":["Remove deps/auto_deps and let automatic dependency detection run with caching enabled (default), or","Keep deps but set cache=True"],"exampleFix":"# before\n@rx.memo(cache=False, deps=[State.count])\ndef doubled(self) -> int: return self.count * 2\n# after\n@rx.memo(deps=[State.count])\ndef doubled(self) -> int: return self.count * 2","handlingStrategy":"validation","validationCode":"if cache is False and (deps is not None or auto_deps is False):\n    raise ValueError('deps/auto_deps require cache=True')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep deps only on cached vars","Rely on automatic dependency tracking with default caching"],"tags":["reflex","computed-var","dependencies","cache"],"backgroundTag":"invalid-decorator-arguments","analyzedSha":"45b8ed5ab735f8a56bbb09a42384f030eb0208e7","analyzedAt":"2026-08-28T19:25:27.644Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}