Feature Request #1802
MemcacheD-based Cache driver (multiple servers)
| Status: | Closed | Start date: | 06/23/2009 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | Libraries:Cache | |||
| Target version: | 2.4 | |||
| Resolution: | worksforme | Points: |
Description
There are 2 extensions provides an interface to memcached:
Using memcached, we get the opportunity to work with multiple servers.
So, the following code does not make sense (Memcache-based Cache driver):
$servers = Kohana::config('cache_memcache.servers');
foreach ($servers as $server)
{
// Make sure all required keys are set
$server += array('host' => '127.0.0.1', 'port' => 11211, 'persistent' => FALSE);
// Add the server to the pool
$this->backend->addServer($server['host'], $server['port'], (bool) $server['persistent'])
or Kohana::log('error', 'Cache: Connection failed: '.$server['host']);
}
And added property "prefix. This is done to ensure that common names do not overlap at different sites
Related issues
Associated revisions
refs #1802
History
Updated by Oleh Zamkovyi almost 4 years ago
- File Memcached.php added
- File cache_memcached.php added
Updated by Oleh Zamkovyi almost 4 years ago
- File Memcached.php added
- File cache_memcached.php added
Updated by Jeremy Bush almost 4 years ago
- Priority changed from Normal to Low
- Resolution deleted (
worksforme)
Can any of the devs test this?
Updated by Jeremy Bush almost 4 years ago
- Status changed from New to Review
Updated by Ben Rogers almost 4 years ago
i agree this should be implemented, one of memcache's strengths is the fact you can load balance it
Updated by Kiall Mac Innes over 3 years ago
- Tracker changed from Bug Report to Feature Request
Updated by Jeremy Bush over 3 years ago
- Status changed from Review to Assigned
- Assignee set to Kiall Mac Innes
- Priority changed from Low to High
Updated by Kiall Mac Innes over 3 years ago
- Resolution set to worksforme
Both the memcache and memcacheD ext's support multiple servers.
I've updated the memcache driver to make use of multiple servers correctly. A memcacheD driver will not be included in the core (why maintain two!). If your willing to maintain the memcacheD driver, I can setup a project here on redmine for it.
Updated by Kiall Mac Innes over 3 years ago
- Status changed from Assigned to Closed
Updated by Kiall Mac Innes over 3 years ago
Humm - looks like I committed a memcacheD driver by mistake (I'll likely remove it before we release) see #723 for the details...
most importantly:
I also wrote up a memcacheD based driver and compared the new memcache driver to this one - memcacheD was
slower for everything bar multi set."