Get the default sass cache object, for the current context. The context depends on factors described below.
sass_cache_get() first checks the
sass.cache option. If it is set to
FALSE, then this function returns
NULL. If it has been set to a string,
it is treated as a directory name, and this function returns a
sass_file_cache() object using that directory. If the option has been set
sass_file_cache() object, then it will return that object.
In most cases, this function uses the user's cache directory, by calling
tools::R_user_dir("sass", which = "cache") (for R 4.0 and above) or
rappdirs::user_cache_dir("R-sass") (for older versions of R).
If this function is called from a Shiny application, it will also look for a
app_cache/. If it exists, it will use a directory named
app_cache/sass/ to store the cache.
When running a Shiny application in a typical R session, it will not create
app_cache/ subdirectory, but it will use it if present. This scopes the
cache to the application.
With Shiny applications hosted on Shiny Server and Connect, it will create
app_cache/sass/ subdirectory, so that the cache is scoped to the
application and will not interfere with another application's cache.
If Shiny Developer Mode is enabled (by setting
options(shiny.devmode = TRUE) or calling
the default global option value for
sass.cache is updated to
TRUE, similar to
getOption("sass.cache", FALSE). This setting allows
developers to make sure what is being returned from
sass() is not an incorrect
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.