# Overwriting .ji files for modules with the same name

**URL:** https://discourse.julialang.org/t/overwriting-ji-files-for-modules-with-the-same-name/15228
**Category:** General Usage
**Created:** [September 20, 2018, 11:52am UTC](https://discourse.julialang.org/t/overwriting-ji-files-for-modules-with-the-same-name/15228 "2018-09-20T11:52:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [September 20, 2018, 11:52am UTC](https://discourse.julialang.org/t/overwriting-ji-files-for-modules-with-the-same-name/15228/1 "2018-09-20T11:52:17Z")

</div>

I just noticed this, in one of my apps. Wondering what happens if I have two apps with the same module name, running at the same time?

```julia
[Info: Recompiling stale cache file /Users/adrian/.julia/compiled/v1.0/BooksController.ji for BooksController [top-level]

```

---

<div class="post-metadata">

### Author: ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)
#### Post date: [September 20, 2018, 6:58pm UTC](https://discourse.julialang.org/t/overwriting-ji-files-for-modules-with-the-same-name/15228/2 "2018-09-20T18:58:23Z")

</div>

Yes, it seems that modules loaded in `Main` (top level) with the same name overwrite their caches.

And at some point, this happens:

```julia
julia> ZeModule.foo()
ERROR: /Users/adrian/appz/1/ZeModule.jl is not stored in the source-text cache
Stacktrace:
 [1] error(::String, ::String) at ./error.jl:42
 [2] _read_dependency_src(::IOStream, ::String) at ./loading.jl:1305
 [3] read_dependency_src(::IOStream, ::String) at ./loading.jl:1291
 [4] read_dependency_src(::String, ::String) at ./loading.jl:1312
 [5] read_from_cache(::Revise.FileInfo, ::String) at /Users/adrian/.julia/packages/Revise/xO23U/src/pkgs.jl:156
 [6] maybe_parse_from_cache!(::Revise.FileInfo, ::String) at /Users/adrian/.julia/packages/Revise/xO23U/src/pkgs.jl:162
 [7] revise_file_now(::String) at /Users/adrian/.julia/packages/Revise/xO23U/src/Revise.jl:413
 [8] revise(::REPL.REPLBackend) at /Users/adrian/.julia/packages/Revise/xO23U/src/Revise.jl:470
 [9] run_backend(::REPL.REPLBackend) at /Users/adrian/.julia/packages/Revise/xO23U/src/Revise.jl:764
 [10] (::getfield(Revise, Symbol("##58#60")){REPL.REPLBackend})() at ./task.jl:259

```
