CacheInterface
interface CacheInterface (View source)
Methods
string
get(string $msgid)
Returns cached msgstr if it is in cache, otherwise $msgid
void
set(string $msgid, string $msgstr)
Caches $msgstr value for key $mesid
bool
has(string $msgid)
Returns true if cache has entry for $msgid
void
setAll(array $translations)
Populates cache with array of $msgid => $msgstr entries
Details
string
get(string $msgid)
Returns cached msgstr if it is in cache, otherwise $msgid
void
set(string $msgid, string $msgstr)
Caches $msgstr value for key $mesid
bool
has(string $msgid)
Returns true if cache has entry for $msgid
void
setAll(array $translations)
Populates cache with array of $msgid => $msgstr entries
This will overwrite existing values for $msgid, but is not guaranteed to clear cache of existing entries
not present in $translations.