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

"Nothing to compact" messages in long running process #47

Closed
Mkranj opened this issue May 13, 2024 · 1 comment · Fixed by #48
Closed

"Nothing to compact" messages in long running process #47

Mkranj opened this issue May 13, 2024 · 1 comment · Fixed by #48

Comments

@Mkranj
Copy link

Mkranj commented May 13, 2024

Related to this issue in Shiny.
In a long-running Shiny app (~week of uptime), the console gets flooded with "Nothing to compact" messages from the compact() function.

If this is behavior as expected, could the messages at least be suppressed in some way?

@wch
Copy link
Member

wch commented May 14, 2024

I found a way to reproduce the problem. With the following code, it starts happening after adding and removing 257 items.

m <- cache_mem()
for (i in 1:258) {
  cat("\n", i, " ")
  m$set(as.character(i), i)
  m$remove(as.character(i))
}

#> ...
#> 254
#> 255  
#> 256  
#> 257  nothing to compact
#>
#> 258  nothing to compact

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 a pull request may close this issue.

2 participants