protected function Redis_CacheCompressed::expandEntry in Redis 7.3
Expand cache entry from fetched data
Parameters
array $values: Raw values fetched from Redis server data
Return value
array Or FALSE if entry is invalid
Overrides Redis_Cache::expandEntry
File
- lib/
Redis/ CacheCompressed.php, line 52
Class
- Redis_CacheCompressed
- This typically brings 80..85% compression in ~20ms/mb write, 5ms/mb read.
Code
protected function expandEntry(array $values, $flushPerm, $flushVolatile) {
if (!empty($values['data']) && !empty($values['compressed'])) {
// Uncompress, suppress warnings e.g. for broken CRC32.
$values['data'] = @gzuncompress($values['data']);
// In such cases, void the cache entry.
if ($values['data'] === false) {
return false;
}
}
return parent::expandEntry($values, $flushPerm, $flushVolatile);
}