Storage on serialized file. More...
Public Member Functions | |
retrieve () | |
Protected Member Functions | |
store (array $array) | |
Protected Attributes | |
$index | |
$filename = 'translate_messageindex.ser' |
Storage on serialized file.
This serializes the whole array. Because this format can preserve the values which are stored as references inside the array, this is the most space efficient storage method and fastest when you want the full index.
Unfortunately when the size of index grows to about 50000 items, even though it is only 3,5M on disk, it takes 35M when loaded into memory and the loading can take more than 0,5 seconds. Because usually we need to look up only few keys, it is better to use another backend which provides random access - this backend doesn't support that.
Definition at line 264 of file MessageIndex.php.
SerializedMessageIndex::retrieve | ( | ) |
Reimplemented from MessageIndex.
Definition at line 271 of file MessageIndex.php.
SerializedMessageIndex::store | ( | array $ | array | ) | [protected] |
Reimplemented from MessageIndex.
Reimplemented in TestableSerializedMessageIndex.
Definition at line 288 of file MessageIndex.php.
SerializedMessageIndex::$filename = 'translate_messageindex.ser' [protected] |
Definition at line 268 of file MessageIndex.php.
SerializedMessageIndex::$index [protected] |
Definition at line 266 of file MessageIndex.php.