/shared_memory.php

Description

eAccelerator shared memory access.

eAccelerator can be used to store data in shared memory and share this between script. This can be used instead of the php shm or shmop API. These functions can be enabled with --with-eaccelerator-shared-memory at compile time

Functions
eaccelerator_gc (line 60)

Garbage collection.

Removes expired keys (session data and content) from shared memory

void eaccelerator_gc ()
eaccelerator_get (line 44)

Get data.

Get data from shared memory. Object need to be serialized when storing them so unserializing is necessary when retrieving them.

  • return: Returns the requested data on succes otherwise NULL if the key doesn't exist or the key was expired.
  • see: eaccelerator_put()
mixed eaccelerator_get (string $key)
  • string $key: The key to identify the data
eaccelerator_lock (line 74)

Lock.

Create a lock with the given key, this allows you to prevent concurrent access to some part of your code. Warning, you don't need this to lock the keys used with eaccelerator_get and eaccelerator_put. The lock can be released with eaccelerator_unlock or automatic at the end of the request.

boolean eaccelerator_lock (string $key)
  • string $key: The key to identify the data to lock
eaccelerator_put (line 33)

Put key.

Put key in the eaccelerator shared memory. eAccelerator doesn't serialize object, so you need to do it you're self or php will segfault on object retrieval.

  • return: Returns true if the function was succesfull otherwise it will return false. When false is returned, this could mean the limit of the total cache is exceeded or the size of the data is to big for the eaccelerator.shm_max directive.
  • see: eaccelerator_rm()
  • see: eaccelerator_get()
boolean eaccelerator_put (string $key, mixed $value, [int $ttl = 0])
  • string $key: The key to identify the data
  • mixed $value: The data to store in shared memory
  • int $ttl: Cache the key for $ttl seconds, 0 for never
eaccelerator_rm (line 54)

Remove key.

Remove key from shared memory

boolean eaccelerator_rm (string $key)
  • string $key: The key to identify the data
eaccelerator_unlock (line 84)

Unlock.

Unlock the access to a key

boolean eaccelerator_unlock (string $key)
  • string $key: The key to identify the data to lock

Documentation generated on Mon, 06 Mar 2006 09:50:32 +0100 by phpDocumentor 1.3.0RC4