Documentation

Cache
in package

SCSS cache

Tags
author

Cedric Morin

Table of Contents

CACHE_VERSION  = 0
$cacheDir  : mixed
$forceFefresh  : mixed
$gcLifetime  : mixed
$prefix  : mixed
$refreshed  : mixed
__construct()  : mixed
Constructor
checkCacheDir()  : mixed
Check that the cache dir exists and is writeable
cleanCache()  : mixed
Delete unused cached files
getCache()  : mixed
Get the cached result of $operation on $what, which is known as dependant from the content of $options
setCache()  : mixed
Put in cache the result of $operation on $what, which is known as dependant from the content of $options
cacheName()  : string
Get the cache name for the caching of $operation on $what, which is known as dependant from the content of $options

Constants

CACHE_VERSION

public mixed CACHE_VERSION = 0

Properties

$cacheDir

public static mixed $cacheDir = false

$forceFefresh

public static mixed $forceFefresh = false

$gcLifetime

public static mixed $gcLifetime = 604800

$prefix

public static mixed $prefix = 'scssphp_'

$refreshed

protected static mixed $refreshed = []

Methods

__construct()

Constructor

public __construct(array<string|int, mixed> $options) : mixed
Parameters
$options : array<string|int, mixed>
Return values
mixed

checkCacheDir()

Check that the cache dir exists and is writeable

public static checkCacheDir() : mixed
Tags
throws
Exception
Return values
mixed

cleanCache()

Delete unused cached files

public static cleanCache() : mixed
Return values
mixed

getCache()

Get the cached result of $operation on $what, which is known as dependant from the content of $options

public getCache(string $operation, mixed $what[, array<string|int, mixed> $options = [] ][, int $lastModified = null ]) : mixed
Parameters
$operation : string

parse, compile...

$what : mixed

content key (e.g., filename to be treated)

$options : array<string|int, mixed> = []

any option that affect the operation result on the content

$lastModified : int = null

last modified timestamp

Tags
throws
Exception
Return values
mixed

setCache()

Put in cache the result of $operation on $what, which is known as dependant from the content of $options

public setCache(string $operation, mixed $what, mixed $value[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$operation : string
$what : mixed
$value : mixed
$options : array<string|int, mixed> = []
Return values
mixed

cacheName()

Get the cache name for the caching of $operation on $what, which is known as dependant from the content of $options

private static cacheName(string $operation, mixed $what[, array<string|int, mixed> $options = [] ]) : string
Parameters
$operation : string
$what : mixed
$options : array<string|int, mixed> = []
Return values
string

Search results