sass_file_cache: Create a file cache object

Description Usage Arguments Value See Also Examples

View source: R/file_cache.R

Description

This creates a file cache which is to be used by sass for caching generated .css files.

Usage

1
sass_file_cache(dir, max_size = 40 * 1024^2, max_age = Inf)

Arguments

dir

The directory in which to store the cached files.

max_size

The maximum size of the cache, in bytes. If the cache grows past this size, the least-recently-used objects will be removed until it fits within this size.

max_age

The maximum age of objects in the cache, in seconds. The default is one week.

Value

A FileCache object.

See Also

sass_cache_get(), sass_cache_context_dir(), FileCache

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Create a cache with the default settings
cache <- sass_file_cache(sass_cache_context_dir())

# Clear the cache
cache$reset()

## End(Not run)

sass documentation built on Jan. 25, 2021, 1:06 a.m.