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

Usage inside deployed app #114

Open
john-c-martens opened this issue Sep 11, 2020 · 1 comment
Open

Usage inside deployed app #114

john-c-martens opened this issue Sep 11, 2020 · 1 comment

Comments

@john-c-martens
Copy link

This issue is similar to Issue #29. I'm using the memoise function inside an R Shiny app and deploying the app using RSConnect. (This work was done in my capacity as a Bayer employee, for the record.) On the deployed app, race conditions obtain when multiple R processes chase the same cached file. The race can result in a corrupted cache file, which will persist afterwards. The solution is to lock the files in the memoise package using a try ... finally pattern. I'm planning to fork off my own fixed version of memoise and submit those fixes back to the main branch.

@wch
Copy link
Member

wch commented Sep 14, 2020

If the issue is a race between $has_key() and $get(): that's something that we're planning on addressing, with some general changes to the caching system. Regarding the possibility of multiple processes writing to the same file (as in #29), that's also something we will address -- the solution is to write to a temp file, then rename it.

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