diff --git a/pystencils/cpu/cpujit.py b/pystencils/cpu/cpujit.py
index 37f8b5606345dbc27ac553c1974bcbf4457c9826..84908dcb29b38fc89a1b381d1491fbde59a09db7 100644
--- a/pystencils/cpu/cpujit.py
+++ b/pystencils/cpu/cpujit.py
@@ -194,7 +194,7 @@ def read_config():
         config['cache']['object_cache'] = os.path.expanduser(config['cache']['object_cache']).format(pid=os.getpid())
 
         if config['cache']['clear_cache_on_start']:
-            clear_cache()
+            shutil.rmtree(config['cache']['object_cache'], ignore_errors=True)
 
         create_folder(config['cache']['object_cache'], False)