@@ -59,6 +59,7 @@ class Config:
5959 FIRMWARE_FOLDER_NAME : str
6060 HIGH_PRIO_STRUCTURE_PATH : str
6161 EJS_DEBUG : bool
62+ EJS_CACHE_LIMIT : int | None
6263 EJS_SETTINGS : dict [str , EjsOption ] # core_name -> EjsOption
6364 EJS_CONTROLS : dict [str , EjsControls ] # core_name -> EjsControls
6465
@@ -169,6 +170,9 @@ def _parse_config(self):
169170 self ._raw_config , "filesystem.firmware_folder" , "bios"
170171 ),
171172 EJS_DEBUG = pydash .get (self ._raw_config , "emulatorjs.debug" , False ),
173+ EJS_CACHE_LIMIT = pydash .get (
174+ self ._raw_config , "emulatorjs.cache_limit" , None
175+ ),
172176 EJS_SETTINGS = pydash .get (self ._raw_config , "emulatorjs.settings" , {}),
173177 EJS_CONTROLS = self ._get_ejs_controls (),
174178 )
@@ -273,6 +277,14 @@ def _validate_config(self):
273277 log .critical ("Invalid config.yml: emulatorjs.debug must be a boolean" )
274278 sys .exit (3 )
275279
280+ if self .config .EJS_CACHE_LIMIT is not None and not isinstance (
281+ self .config .EJS_CACHE_LIMIT , int
282+ ):
283+ log .critical (
284+ "Invalid config.yml: emulatorjs.cache_limit must be an integer"
285+ )
286+ sys .exit (3 )
287+
276288 if not isinstance (self .config .EJS_SETTINGS , dict ):
277289 log .critical ("Invalid config.yml: emulatorjs.settings must be a dictionary" )
278290 sys .exit (3 )
0 commit comments