Skip to content

Conversation

@jbclements
Copy link

It took me way too long to get with-cache working with TR, and the problem was doubly hard to find because of a bad error message. Specifically, if you import *current-cache-keys* with type (Any -> Any), then TR won't allow with-cache to call the procedures stored in the parameter. Should have been obvious, but the error message that's generated says something like "Internal error, can't serialize the key 14" or some such, which makes it sound like the problem is with the cached value, rather than with the key. In order to address this, I modified the error message but also added a section of documentation that shows a very simple example of using with-cache with Typed Racket.

Hope this helps other people!

also, improve an error message
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

Successfully merging this pull request may close these issues.

1 participant