| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/file_cache.R |
| 3 |
\name{sass_file_cache} |
| 4 |
\alias{sass_file_cache} |
| 5 |
\title{Create a file cache object} |
| 6 |
\usage{ |
| 7 |
sass_file_cache(dir, max_size = 40 * 1024^2, max_age = Inf) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{dir}{The directory in which to store the cached files.} |
| 11 |
|
| 12 |
\item{max_size}{The maximum size of the cache, in bytes. If the cache grows |
| 13 |
past this size, the least-recently-used objects will be removed until it |
| 14 |
fits within this size.} |
| 15 |
|
| 16 |
\item{max_age}{The maximum age of objects in the cache, in seconds. The |
| 17 |
default is one week.} |
| 18 |
} |
| 19 |
\value{ |
| 20 |
A \link{FileCache} object. |
| 21 |
} |
| 22 |
\description{ |
| 23 |
This creates a file cache which is to be used by sass for caching generated |
| 24 |
.css files. |
| 25 |
} |
| 26 |
\examples{ |
| 27 |
\dontrun{ |
| 28 |
# Create a cache with the default settings |
| 29 |
cache <- sass_file_cache(sass_cache_context_dir()) |
| 30 |
|
| 31 |
# Clear the cache |
| 32 |
cache$reset() |
| 33 |
} |
| 34 |
|
| 35 |
} |
| 36 |
\seealso{ |
| 37 |
\code{\link[=sass_cache_get]{sass_cache_get()}}, \code{\link[=sass_cache_context_dir]{sass_cache_context_dir()}}, \link{FileCache} |
| 38 |
} |