remove old cache wrapper (#32653)

* remove wrapper that is functools.cache

* format
This commit is contained in:
Shane Smiskol
2024-06-07 21:24:32 -07:00
committed by GitHub
parent 9ce380d3ce
commit 451e171ad9
3 changed files with 2 additions and 15 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
from functools import cache
import subprocess
from openpilot.common.utils import cache
from openpilot.common.run import run_cmd, run_cmd_default
-12
View File
@@ -1,11 +1,3 @@
from collections.abc import Callable
from functools import lru_cache
from typing import TypeVar
_RT = TypeVar("_RT")
class Freezable:
_frozen: bool = False
@@ -17,7 +9,3 @@ class Freezable:
if self._frozen:
raise Exception("cannot modify frozen object")
super().__setattr__(*args, **kwargs)
def cache(user_function: Callable[..., _RT], /) -> Callable[..., _RT]:
return lru_cache(maxsize=None)(user_function)