Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading code & caching #341

Open
hlship opened this issue Feb 17, 2016 · 4 comments
Open

Reloading code & caching #341

hlship opened this issue Feb 17, 2016 · 4 comments

Comments

@hlship
Copy link

hlship commented Feb 17, 2016

This is a bit out-of-left field, but I tend to see things where after reloading code, with changed schemas, some of my functions appear to be checking against the old schemas, not the new ones. I suspect there's some caching going on, I don't think it's in my code. Is there a cache and, if so, how to clear it?

@w01fe
Copy link
Member

w01fe commented Feb 17, 2016

There is no cache, as far as I recall. However, you may have to recompile downstream code to pick up the new schemas.

For example, if you have:

(def A s/Int)
(def B {:a A})
(s/defn foo [b :- b])

then after changing A, you have to recompile A, B and foo (in that order) to see the new changes. In particular, note that schematized functions capture the schema at the time of definition.

If you are redefining classes (e.g. records), the same rules apply because the new version is actually a new Class that happens to have the same name.

If that doesn't seem to cover what you're seeing, can you please provide a concrete example? Thanks!

@w01fe
Copy link
Member

w01fe commented Mar 15, 2016

Did you end up figuring out what was causing the problem here? Thanks!

@hlship
Copy link
Author

hlship commented Mar 15, 2016

Give me just a little longer to try and come up with a scenario.

@w01fe
Copy link
Member

w01fe commented Mar 17, 2016

No rush, just wanted to check in. Thanks!

On Tue, Mar 15, 2016 at 10:34 PM, Howard M. Lewis Ship <
[email protected]> wrote:

Give me just a little longer to try and come up with a scenario.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#341 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants