# How to properly clear and control JIT cache in dolfinx

**URL:** <https://fenicsproject.discourse.group/t/how-to-properly-clear-and-control-jit-cache-in-dolfinx/12220>\
**Category:** dolfinx\
**Created:** [September 14, 2023, 7:34pm UTC](https://fenicsproject.discourse.group/t/how-to-properly-clear-and-control-jit-cache-in-dolfinx/12220 "2023-09-14T19:34:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nate](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/nate/32/17_2.png) [@nate](https://fenicsproject.discourse.group/u/nate)\
**Post date:** [September 14, 2023, 7:41pm UTC](https://fenicsproject.discourse.group/t/how-to-properly-clear-and-control-jit-cache-in-dolfinx/12220/2 "2023-09-14T19:41:00Z")

</div>

dijitso is part of legacy FEniCS. The python layer of dolfinx does not use dijitso, instead it uses CFFI. And the default cache directory is the one you’ve referred to.

Regarding many files in your cache. Make sure you’re properly generating `dolfinx.fem.form` objects outside of `for`/`while` loops. See, e.g., [Speeding up time-dependent diffusion equation - #6 by nate](https://fenicsproject.discourse.group/t/speeding-up-time-dependent-diffusion-equation/11856/6)

---

_[View the full topic](https://fenicsproject.discourse.group/t/how-to-properly-clear-and-control-jit-cache-in-dolfinx/12220)._
