# Hooking up code to run whenever Revise triggers?

**URL:** <https://discourse.julialang.org/t/hooking-up-code-to-run-whenever-revise-triggers/111787>\
**Category:** General Usage\
**Tags:** revise\
**Created:** [March 18, 2024, 6:11pm UTC](https://discourse.julialang.org/t/hooking-up-code-to-run-whenever-revise-triggers/111787 "2024-03-18T18:11:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [March 18, 2024, 6:11pm UTC](https://discourse.julialang.org/t/hooking-up-code-to-run-whenever-revise-triggers/111787/1 "2024-03-18T18:11:51Z")

</div>

I have a number of caches that store various things to make my code run faster.  
However, when i am interactively developing and debugging my package I often want to clear those caches because they have cached a result computed with a method i have redefined.  
I implemented a little package to make the clearing easier: [GitHub - JuliaComputing/CentralizedCaches.jl: Making it possible to clear all your caches at once](https://github.com/JuliaComputing/CentralizedCaches.jl)

I am now wondering if I can hook it up to Revise so that when any thing gets redefined by Revise i can clear out all my caches so that I don’t have any incorrect results stored.

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [March 18, 2024, 6:54pm UTC](https://discourse.julialang.org/t/hooking-up-code-to-run-whenever-revise-triggers/111787/2 "2024-03-18T18:54:27Z")

</div>

Maybe [https://timholy.github.io/Revise.jl/stable/user\_reference/#Revise.entr](https://timholy.github.io/Revise.jl/stable/user_reference/#Revise.entr)?
