PHP Class Jenner\SimpleFork\Cache\SharedMemory

Inheritance: implements Jenner\SimpleFork\Cache\CacheInterface
Afficher le fichier Open project: huyanping/simple-fork-php

Protected Properties

Свойство Type Description
$client_count_key string shared memory ipc key
$shm resource holds shared memory resource
$size integer memory size

Méthodes publiques

Méthode Description
__construct ( integer $size = 33554432, string $file = __FILE__ )
__wakeup ( ) init when wakeup
attach ( string $file = __FILE__ ) connect shared memory
delete ( $key ) : boolean delete var
dettach ( ) : boolean
get ( $key, null $default = null ) : boolean | mixed get var
has ( $key ) : boolean has var ?
remove ( ) : boolean remove shared memory.
set ( $key, $value ) : boolean set var
shm_key ( $val ) : mixed generate shm key

Method Details

__construct() public méthode

public __construct ( integer $size = 33554432, string $file = __FILE__ )
$size integer memory size
$file string

__wakeup() public méthode

init when wakeup
public __wakeup ( )

attach() public méthode

connect shared memory
public attach ( string $file = __FILE__ )
$file string

delete() public méthode

delete var
public delete ( $key ) : boolean
$key
Résultat boolean

dettach() public méthode

public dettach ( ) : boolean
Résultat boolean

get() public méthode

get var
public get ( $key, null $default = null ) : boolean | mixed
$key
$default null
Résultat boolean | mixed

has() public méthode

has var ?
public has ( $key ) : boolean
$key
Résultat boolean

remove() public méthode

you should know that it maybe does not work.
public remove ( ) : boolean
Résultat boolean

set() public méthode

set var
public set ( $key, $value ) : boolean
$key
$value
Résultat boolean

shm_key() public méthode

generate shm key
public shm_key ( $val ) : mixed
$val
Résultat mixed

Property Details

$client_count_key protected_oe property

shared memory ipc key
protected string $client_count_key
Résultat string

$shm protected_oe property

holds shared memory resource
protected resource $shm
Résultat resource

$size protected_oe property

memory size
protected int $size
Résultat integer