# Recompiling stale cache file. How to minimize that?

**URL:** <https://discourse.julialang.org/t/recompiling-stale-cache-file-how-to-minimize-that/16543>\
**Category:** New to Julia\
**Created:** [October 19, 2018, 8:06pm UTC](https://discourse.julialang.org/t/recompiling-stale-cache-file-how-to-minimize-that/16543 "2018-10-19T20:06:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leiteiro](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@leiteiro](https://discourse.julialang.org/u/leiteiro)\
**Post date:** [October 19, 2018, 8:06pm UTC](https://discourse.julialang.org/t/recompiling-stale-cache-file-how-to-minimize-that/16543/1 "2018-10-19T20:06:23Z")

</div>

I repeatedly get the

```
Info: Recompiling stale cache file C:\..\ABC.ji for ABC [top-level]

```

although I did not touch the file ABC. Annoying and time-consuming.

What’s the best way to turn this off or what have I configured improperly?

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [October 19, 2018, 8:27pm UTC](https://discourse.julialang.org/t/recompiling-stale-cache-file-how-to-minimize-that/16543/2 "2018-10-19T20:27:02Z")

</div>

> [@leiteiro](#):
>
> What’s the best way to turn this off or what have I configured improperly?

You cannot turn it off, Julia needs to compile! Note that the cache goes stale if you changed another package that `ABC` _depends_ on so that’s likely what’s happening.

Anyway: yes compile times are getting painful right now. Eventually we’ll have full blown compile caching which in principle should alleviate this problem quite a bit since presumably it won’t be compiling _everything_ in the package, just what it needs to. In the meantime [Revise.jl](https://github.com/timholy/Revise.jl) already does just that, the only catch is that you have to leave the REPL open.

---

<div class="post-metadata">

**Author:** ![leiteiro](https://avatars.discourse-cdn.com/v4/letter/l/b5e925/32.png) [@leiteiro](https://discourse.julialang.org/u/leiteiro)\
**Post date:** [October 19, 2018, 8:48pm UTC](https://discourse.julialang.org/t/recompiling-stale-cache-file-how-to-minimize-that/16543/3 "2018-10-19T20:48:46Z")

</div>

> [@ExpandingMan](#):
>
> Note that the cache goes stale if you changed another package that `ABC` _depends_ on so that’s likely what’s happening.

Well, in fact this file does _not_ depend on any other file. I guess this is also what [top-level] in the info means.

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [October 20, 2018, 10:47am UTC](https://discourse.julialang.org/t/recompiling-stale-cache-file-how-to-minimize-that/16543/4 "2018-10-20T10:47:30Z")

</div>

At least for julia 1.0 I think I noticed that happening when I needed to run `pkg> resolve`, and doing so made the repeated compilation go away.

---

<div class="post-metadata">

**Author:** ![hotplot](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hotplot/32/5733_2.png) [@hotplot](https://discourse.julialang.org/u/hotplot)\
**Post date:** [November 8, 2018, 12:25am UTC](https://discourse.julialang.org/t/recompiling-stale-cache-file-how-to-minimize-that/16543/5 "2018-11-08T00:25:52Z")

</div>

How often is recompilation supposed to occur?

JuliaPro recompiles every package I use every single time I start the REPL.

I assumed this was normal, but from your posts I get the impression it should only occur if a package or dependency is modified.
