(Continuation of #3198 (comment))
Currently bindCache() doesn't consider getCurrentOutputInfo() when computing cache keys, but it probably should (especially considering that thematic implicitly calls it at plot time). For a minimal example of the suprising behavior it can lead to, run this app once to warm the cache), then change fg = "white" to fg = "red" notice how the fg of the plot remains unchanged (it should be red not white)
library(shiny)
shinyOptions(cache = cachem::cache_disk("./myapp-cache"))
ui <- fluidPage(
theme = bslib::bs_theme(bg = "black", fg = "white"),
"True foreground color",
plotOutput("p")
)
server <- function(input, output, session) {
output$p <- renderPlot(plot(1:10)) %>%
bindCache()
}
thematic::thematic_shiny()
shinyApp(ui, server)
(Continuation of #3198 (comment))
Currently
bindCache()doesn't considergetCurrentOutputInfo()when computing cache keys, but it probably should (especially considering that thematic implicitly calls it at plot time). For a minimal example of the suprising behavior it can lead to, run this app once to warm the cache), then changefg = "white"tofg = "red"notice how thefgof the plot remains unchanged (it should be red not white)