Open
Description
Hi Jeremy,
I thought it would be nice to be able to take advantage of memcached multiget functionality. In current implementation multiget (I give array of keys to get function) fails because of "$key = $this->prefix . $key;" line.
public function get($key)
{
if ($this->isSafe()) {
$key = $this->prefix . $key;
return $this->mem->get($key);
}
return false;
}
Something like below should do the work, I guess. Please let me know what you think.
public function get($key)
{
if ($this->isSafe()) {
if (is_array($key)) {
if ($this->prefix != '') {
for ($i = 0; $i < count($key); $i++) {
$key[$i] = $this->prefix . $key[$i];
}
}
}
else {
$key = $this->prefix . $key;
}
return $this->mem->get($key);
}
return false;
}
Metadata
Metadata
Assignees
Labels
No labels