dolibarr  7.0.0-beta
Functions
memory.lib.php File Reference

Set of function for memory/cache management. More...

Go to the source code of this file.

Functions

 dol_setcache ($memoryid, $data)
 Save data into a memory area shared by all users, all sessions on server. More...
 
 dol_getcache ($memoryid)
 Read a memory area shared by all users, all sessions on server. More...
 
 dol_getshmopaddress ($memoryid)
 Return shared memory address used to store dataset with key memoryid. More...
 
 dol_listshmop ()
 Return list of contents of all memory area shared. More...
 
 dol_setshmop ($memoryid, $data)
 Save data into a memory area shared by all users, all sessions on server. More...
 
 dol_getshmop ($memoryid)
 Read a memory area shared by all users, all sessions on server. More...
 

Detailed Description

Set of function for memory/cache management.

Definition in file memory.lib.php.

Function Documentation

dol_getcache (   $memoryid)

Read a memory area shared by all users, all sessions on server.

Parameters
string$memoryidMemory id of shared area
Returns
int <0 if KO, data if OK

Definition at line 110 of file memory.lib.php.

References dol_getshmop().

Referenced by Translate\load(), and Translate\loadFromDatabase().

dol_getshmop (   $memoryid)

Read a memory area shared by all users, all sessions on server.

Parameters
string$memoryidMemory id of shared area ('main', 'agenda', ...)
Returns
int <0 if KO, data if OK

Definition at line 252 of file memory.lib.php.

References dol_getshmopaddress().

Referenced by dol_getcache(), and dol_listshmop().

dol_getshmopaddress (   $memoryid)

Return shared memory address used to store dataset with key memoryid.

Parameters
string$memoryidMemory id of shared area ('main', 'agenda', ...)
Returns
int <0 if KO, Memoy address of shared memory for key

Definition at line 185 of file memory.lib.php.

Referenced by dol_getshmop(), and dol_setshmop().

dol_listshmop ( )

Return list of contents of all memory area shared.

Returns
array

Definition at line 197 of file memory.lib.php.

References dol_getshmop().

dol_setcache (   $memoryid,
  $data 
)

Save data into a memory area shared by all users, all sessions on server.

Parameters
string$memoryidMemory id of shared area
string$dataData to save
Returns
int <0 if KO, Nb of bytes written if OK

Definition at line 42 of file memory.lib.php.

References dol_setshmop().

Referenced by Translate\load(), and Translate\loadFromDatabase().

dol_setshmop (   $memoryid,
  $data 
)

Save data into a memory area shared by all users, all sessions on server.

Parameters
int$memoryidMemory id of shared area ('main', 'agenda', ...)
string$dataData to save
Returns
int <0 if KO, Nb of bytes written if OK

Definition at line 217 of file memory.lib.php.

References dol_getshmopaddress(), dol_strlen(), and print.

Referenced by dol_setcache().