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Zx9AD"aX󔪞#h6h*6 QU2xoxEuJZ13I?k -̏tUL\夯d蜨h)Dy-1#P澋/$]--vYH 3NWøkZuWzʼnhXC.ޤ tOy F<6ZpSٱ[>=o\8w]OdZ|C+q4)uNbTeƧK%? 3+sL tίLuUS%0 6dMݑgf'~u!Ӂ0ڶSr4YFoL)҈+3VM7p8~9g%{i'P)f/Ec Ad@AJ1K$˖HC: $this->max_packet_size()) { trigger_error("rcube_cache: max_packet_size ($this->max_packet) exceeded for key $key. Tried to write $size bytes", E_USER_WARNING); return false; } $db_key = $this->prefix . '.' . $key; // Remove NULL rows (here we don't need to check if the record exist) if ($value == 'N;') { $result = $this->db->query( "DELETE FROM {$this->table} WHERE " . ($this->userid ? "`user_id` = {$this->userid} AND " : "") ."`cache_key` = ?", $db_key); return !$this->db->is_error($result); } $expires = $this->db->param($this->ttl ? $this->db->now($this->ttl) : 'NULL', rcube_db::TYPE_SQL); $pkey = ['cache_key' => $db_key]; if ($this->userid) { $pkey['user_id'] = $this->userid; } $result = $this->db->insert_or_update( $this->table, $pkey, ['expires', 'data'], [$expires, $value] ); $count = $this->db->affected_rows($result); return $count > 0; } /** * Deletes the cache record(s). * * @param string $key Cache key name or pattern * @param bool $prefix_mode Enable it to clear all keys starting * with prefix specified in $key */ protected function remove_record($key = null, $prefix_mode = false) { // Remove all keys (in specified cache) if ($key === null) { $where = "`cache_key` LIKE " . $this->db->quote($this->prefix . '.%'); $this->cache = []; } // Remove keys by name prefix else if ($prefix_mode) { $where = "`cache_key` LIKE " . $this->db->quote($this->prefix . '.' . $key . '%'); foreach (array_keys($this->cache) as $k) { if (strpos($k, $key) === 0) { $this->cache[$k] = null; } } } // Remove one key by name else { $where = "`cache_key` = " . $this->db->quote($this->prefix . '.' . $key); $this->cache[$key] = null; } $this->db->query( "DELETE FROM {$this->table} WHERE " . ($this->userid ? "`user_id` = {$this->userid} AND " : "") . $where ); } /** * Serializes data for storing */ protected function serialize($data) { return $this->db->encode($data, $this->packed); } /** * Unserializes serialized data */ protected function unserialize($data) { return $this->db->decode($data, $this->packed); } /** * Determine the maximum size for cache data to be written */ protected function max_packet_size() { if ($this->max_packet < 0) { $this->max_packet = 2097152; // default/max is 2 MB if ($value = $this->db->get_variable('max_allowed_packet', $this->max_packet)) { $this->max_packet = $value; } $this->max_packet -= 2000; } return $this->max_packet; } }