Re:Shiny: Easy web applications in R
by macarthy12 on Monday September 23, 2013 @05:05AM
(#6429718)
Is there any way to cache, or memorize calculations in Shiny?
[ Parent
| on HN ]
Yes, the whole paradigm is to use 'reactive' functions - i.e. functions whose output is cached.
Re:Shiny: Easy web applications in R
by macarthy12 on Monday September 23, 2013 @06:20AM
(#6429894)
I guess I'm wondering it cache across requests?
In the Shiny framework we think less about short-lived HTTP requests, and more about long-lived (websocket) sessions. Reactive expressions cache their results within or across sessions, depending on where they are declared (this is just a natural result of R's lexical scoping).