\Pluf_Cache_File

A file based cache

در این مدل تمام داده‌هایی که کش می شود در پرونده‌هایی در یک پوشه قرار می‌گیرد. این پوشه نیز در تنظیم‌ها به صورت زیر تعیین می‌شود:


    cfg['cache_file_folder'] = 'path';

تمام زیر پوشه‌هایی که در این مسیر ایجاد می‌شود با استفاده MD5 تعیین نام خواهد شد.

Summary

Methods
Properties
Constants
factory()
set()
get()
__construct()
_keyToFile()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$_debug
$_keymap
N/A

Properties

$_debug

$_debug : boolean

Is debug mode?

Type

boolean

$_keymap

$_keymap : array

Mapping key => md5.

Type

array

Methods

factory()

factory() : \Pluf_Cache_*

فراخوانی سازنده کش

Returns

\Pluf_Cache_* —

Cache object

set()

set(  $key,   $value,   $timeout = null) : boolean

Set a value in the cache.

Parameters

$key
$value
$timeout

Returns

boolean —

Success

get()

get(  $key,   $default = null) 

Get value from the cache.

Parameters

$key
$default

__construct()

__construct() 

_keyToFile()

_keyToFile(  $key) : string

Convert a key into a path to a file.

Parameters

$key

Returns

string —

Path to file