dolibarr 21.0.0-beta
|
Set of function for memory/cache management. More...
Go to the source code of this file.
Functions | |
dol_setcache ($memoryid, $data, $expire=0, $filecache=0) | |
Save data into a memory area shared by all users, all sessions on server. | |
dol_getcache ($memoryid, $filecache=0) | |
Read a memory area shared by all users, all sessions on server. | |
dol_getshmopaddress ($memoryid) | |
Return shared memory address used to store dataset with key memoryid. | |
dol_listshmop () | |
Return list of contents of all memory area shared. | |
dol_setshmop ($memoryid, $data, $expire) | |
Save data into a memory area shared by all users, all sessions on server. | |
dol_getshmop ($memoryid) | |
Read a memory area shared by all users, all sessions on server. | |
Set of function for memory/cache management.
Definition in file memory.lib.php.
dol_getcache | ( | $memoryid, | |
$filecache = 0 ) |
Read a memory area shared by all users, all sessions on server.
string | $memoryid | Memory id of shared area |
int | $filecache | 1 Enable file cache if no other session cache available, 0 Disabled (default) |
Definition at line 170 of file memory.lib.php.
References $conf, dol_delete_file(), dol_getshmop(), dol_is_file(), dol_now(), dolDecrypt(), getDolGlobalInt(), and getDolGlobalString().
Referenced by commande_prepare_head(), conferenceorboothProjectPrepareHead(), contact_prepare_head(), contract_prepare_head(), facture_prepare_head(), facturefourn_prepare_head(), fichinter_prepare_head(), invoice_rec_prepare_head(), Translate\load(), Translate\loadFromDatabase(), member_prepare_head(), project_prepare_head(), propal_prepare_head(), societe_prepare_head(), and user_prepare_head().
dol_getshmop | ( | $memoryid | ) |
Read a memory area shared by all users, all sessions on server.
string | $memoryid | Memory id of shared area ('main', 'agenda', ...) |
Definition at line 350 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.
string | $memoryid | Memory id of shared area ('main', 'agenda', ...) |
Definition at line 276 of file memory.lib.php.
Referenced by dol_getshmop(), and dol_setshmop().
dol_listshmop | ( | ) |
Return list of contents of all memory area shared.
Definition at line 290 of file memory.lib.php.
References dol_getshmop().
dol_setcache | ( | $memoryid, | |
$data, | |||
$expire = 0, | |||
$filecache = 0 ) |
Save data into a memory area shared by all users, all sessions on server.
Note: MAIN_CACHE_COUNT must be set.
string | $memoryid | Memory id of shared area |
mixed | $data | Data to save. It must not be a null value. |
int | $expire | ttl in seconds, 0 never expire |
int | $filecache | 1 Enable file cache if no other session cache available, 0 Disabled (default) |
Definition at line 70 of file memory.lib.php.
References $conf, dol_is_dir(), dol_is_file(), dol_mkdir(), dol_now(), dol_setshmop(), dol_time_plus_duree(), dolEncrypt(), getDolGlobalInt(), and getDolGlobalString().
Referenced by commande_prepare_head(), conferenceorboothProjectPrepareHead(), contact_prepare_head(), contract_prepare_head(), facture_prepare_head(), facturefourn_prepare_head(), fichinter_prepare_head(), invoice_rec_prepare_head(), Translate\load(), Translate\loadFromDatabase(), member_prepare_head(), project_prepare_head(), propal_prepare_head(), societe_prepare_head(), and user_prepare_head().
dol_setshmop | ( | $memoryid, | |
$data, | |||
$expire ) |
Save data into a memory area shared by all users, all sessions on server.
string | $memoryid | Memory id of shared area ('main', 'agenda', ...) |
mixed | mixed[] | $data | Data to save. Must be a not null value. |
int | $expire | ttl in seconds, 0 never expire |
Definition at line 312 of file memory.lib.php.
References dol_getshmopaddress(), and dol_strlen().
Referenced by dol_setcache().