Cache the translation table into the file system.
Method Summary
-
clean($catalogue, $culture)
Cleans up the cache for the specified section and locale.
-
clear()
Flushes the cache. Deletes all the cache files.
-
mixed
get($catalogue, $culture, $filename)
Gets the data from the cache.
-
getGroup($catalogue, $culture)
Gets the cache file GROUP based section and locale.
-
getID($catalogue, $culture)
Gets the cache file ID based section and locale.
-
int
getLifeTime()
Gets the cache life time.
-
initialize($cacheDir)
Creates a new Translation cache.
-
save($data, $catalogue, $culture)
Saves the data to cache for the specified section and locale.
-
setLifeTime($time)
Sets the cache life time.
Method Details
-
clean ($catalogue, $culture)
Browse code
| $catalogue |
The translation section. |
| $culture |
The translation locale, e.g. "en_AU". |
Cleans up the cache for the specified section and locale.
-
Flushes the cache. Deletes all the cache files.
-
(mixed) get ($catalogue, $culture, $filename)
Browse code
| $catalogue |
The translation section. |
| $culture |
The translation locale, e.g. "en_AU". |
| $filename |
If the source is a file, this file's modified time is newer than the cache's modified time, no cache hit. |
Gets the data from the cache.
returns Boolean FALSE if no cache hit. Otherwise, translation table data for the specified section and locale.
-
getGroup ($catalogue, $culture)
Browse code
| $catalogue |
The translation section. |
| $culture |
The translation locale, e.g. "en_AU". |
Gets the cache file GROUP based section and locale.
-
getID ($catalogue, $culture)
Browse code
| $catalogue |
The translation section. |
| $culture |
The translation locale, e.g. "en_AU". |
Gets the cache file ID based section and locale.
-
Gets the cache life time.
returns Cache life time.
-
initialize ($cacheDir)
Browse code
| $cacheDir |
Directory to store the cache files. |
Creates a new Translation cache.
-
save ($data, $catalogue, $culture)
Browse code
| $data |
The data to save. |
| $catalogue |
The translation section. |
| $culture |
The translation locale, e.g. "en_AU". |
Saves the data to cache for the specified section and locale.
-
Sets the cache life time.
|