Skip to content

add docs for using with-cache with TR #27

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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