\Pluf_Cache_Apc

APC cache

Warning: This extension is considered unmaintained and dead. However, the source code for this extension is still available within PECL GIT here: http://git.php.net/?p=pecl/caching/apc.git.

You need APC installed on your server for this cache system to work. You can install APC with $ sudo pecl install apc on most systems.

A special 'cache_apc_keyprefix' can be set to use APC for different applications and avoid conflict. Compression is performed at the PHP level using the gz(in|de)flate functions.

Example of configuration:

$cfg['cache_engine'] = 'Pluf_Cache_Apc';
$cfg['cache_timeout'] = 300;
$cfg['cache_apc_keyprefix'] = 'uniqueforapp';
$cfg['cache_apc_compress'] = true;

Summary

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

Properties

$keyprefix

$keyprefix : 

پیشوندی که به تمام کلیدهای کش اضافه می‌شود.

این کلید در تنظیم‌های سیستم تعیین می‌شود.

Type

$compress

$compress : 

فشرده کردن داده‌ها را تعیین می‌کند.

در صورتی که فشرده سازی فعال شود یک مقدار سربار محاسباتی داریم اما حجم استفاده شده کاهش پیدا می‌کنه.

Type

Methods

factory()

factory() : \Pluf_Cache_*

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

Returns

\Pluf_Cache_* —

Cache object

set()

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

یک مقدار را در کش قرار می‌دهد

Parameters

$key
$value
$timeout

Returns

boolean —

حالت موفقیت انجام این عمل را تعیین می‌کند.

get()

get(  $key,   $default = null) : mixed

Get value from the cache.

Parameters

$key
$default

Returns

mixed —

Stored value or default

__construct()

__construct() 

یک نمونه جدید از این کلاس ایجاد می‌کند

نمونه ایجاد شده با استفاده از تنظیم‌هایی که در تنظیم‌های سرور تعیین شده\ است مقدار دهی و راه اندازی می‌شود.