PHP Class Microweber\Utils\Adapters\Cache\Storage\FileStorage

Inheritance: implements Illuminate\Contracts\Cache\Store
ファイルを表示 Open project: microweber/microweber Class Usage Examples

Public Properties

Property Type Description
$deleted_tags
$memory

Protected Properties

Property Type Description
$directory
$directoryTags
$files
$prefix
$tags

Public Methods

Method Description
__construct ( $prefix = '' )
appendLocale ( $key )
decrement ( string $key, mixed $value = 1 ) Increment the value of an item in the cache.
flush ( $all = false ) Remove all items from the cache.
forever ( string $key, mixed $value ) Store an item in the cache indefinitely.
forget ( string $key ) Remove an item from the cache.
forgetTags ( string $string ) Remove an item from the cache by tags.
get ( string $key ) : mixed Retrieve an item from the cache by key.
getDirectory ( ) : string Get the working directory of the cache.
getFilesystem ( ) : Illuminate\Filesystem\Filesystem Get the Filesystem instance.
getPrefix ( ) : string Get the cache key prefix.
increment ( string $key, mixed $value = 1 ) Increment the value of an item in the cache.
mkdir_recursive ( $pathname )
normalize_path ( $path, $slash_it = true )
put ( string $key, mixed $value, integer $minutes ) Store an item in the cache for a given number of minutes.
reduce_double_slashes ( $str )
remember ( string $key, DateTime | integer $minutes, Closure $callback ) : mixed Get an item from the cache, or store the default value.
rememberForever ( string $key, Closure $callback ) : mixed Get an item from the cache, or store the default value forever.
rmdir ( $directory, $empty = true )
tags ( $tags ) : object Tags for cache.

Protected Methods

Method Description
createCacheDirectory ( string $path ) Create the file cache directory if necessary.
expiration ( integer $minutes ) : integer Get the expiration time based on the given minutes.
path ( string $key ) : string Get the full path for the given cache key.

Private Methods

Method Description
_setTags ( string $path ) Save Tags for cache.

Method Details

__construct() public method

public __construct ( $prefix = '' )

appendLocale() public method

public appendLocale ( $key )

createCacheDirectory() protected method

Create the file cache directory if necessary.
protected createCacheDirectory ( string $path )
$path string

decrement() public method

Increment the value of an item in the cache.
public decrement ( string $key, mixed $value = 1 )
$key string
$value mixed

expiration() protected method

Get the expiration time based on the given minutes.
protected expiration ( integer $minutes ) : integer
$minutes integer
return integer

flush() public method

Remove all items from the cache.
public flush ( $all = false )

forever() public method

Store an item in the cache indefinitely.
public forever ( string $key, mixed $value )
$key string
$value mixed

forget() public method

Remove an item from the cache.
public forget ( string $key )
$key string

forgetTags() public method

Remove an item from the cache by tags.
public forgetTags ( string $string )
$string string

get() public method

Retrieve an item from the cache by key.
public get ( string $key ) : mixed
$key string
return mixed

getDirectory() public method

Get the working directory of the cache.
public getDirectory ( ) : string
return string

getFilesystem() public method

Get the Filesystem instance.
public getFilesystem ( ) : Illuminate\Filesystem\Filesystem
return Illuminate\Filesystem\Filesystem

getPrefix() public method

Get the cache key prefix.
public getPrefix ( ) : string
return string

increment() public method

Increment the value of an item in the cache.
public increment ( string $key, mixed $value = 1 )
$key string
$value mixed

mkdir_recursive() public method

public mkdir_recursive ( $pathname )

normalize_path() public method

public normalize_path ( $path, $slash_it = true )

path() protected method

Get the full path for the given cache key.
protected path ( string $key ) : string
$key string
return string

put() public method

Store an item in the cache for a given number of minutes.
public put ( string $key, mixed $value, integer $minutes )
$key string
$value mixed
$minutes integer

reduce_double_slashes() public method

public reduce_double_slashes ( $str )

remember() public method

Get an item from the cache, or store the default value.
public remember ( string $key, DateTime | integer $minutes, Closure $callback ) : mixed
$key string
$minutes DateTime | integer
$callback Closure
return mixed

rememberForever() public method

Get an item from the cache, or store the default value forever.
public rememberForever ( string $key, Closure $callback ) : mixed
$key string
$callback Closure
return mixed

rmdir() public method

public rmdir ( $directory, $empty = true )

tags() public method

Tags for cache.
public tags ( $tags ) : object
return object

Property Details

$deleted_tags public_oe property

public $deleted_tags

$directory protected_oe property

protected $directory

$directoryTags protected_oe property

protected $directoryTags

$files protected_oe property

protected $files

$memory public_oe property

public $memory

$prefix protected_oe property

protected $prefix

$tags protected_oe property

protected $tags