@@ -65,7 +65,7 @@ Memcache
6565
6666In order to use the Memcache cache driver you must have it compiled
6767and enabled in your php.ini. You can read about Memcache
68- ` on the PHP website <http://us2. php.net/memcache >`_. It will
68+ ` on the PHP website <http://php.net/memcache >`_. It will
6969give you a little background information about what it is and how
7070you can use it as well as how to install it.
7171
@@ -82,6 +82,31 @@ driver by itself.
8282 $cacheDriver->setMemcache($memcache);
8383 $cacheDriver->save('cache_id', 'my_data');
8484
85+ Memcached
86+ ~~~~~~~~
87+
88+ Memcached is a more recent and complete alternative extension to
89+ Memcache.
90+
91+ In order to use the Memcached cache driver you must have it compiled
92+ and enabled in your php.ini. You can read about Memcached
93+ ` on the PHP website <http://php.net/memcached >`_. It will
94+ give you a little background information about what it is and how
95+ you can use it as well as how to install it.
96+
97+ Below is a simple example of how you could use the Memcached cache
98+ driver by itself.
99+
100+ .. code-block :: php
101+
102+ <?php
103+ $memcached = new Memcached();
104+ $memcached->addServer('memcache_host', 11211);
105+
106+ $cacheDriver = new \Doctrine\Common\Cache\MemcachedCache();
107+ $cacheDriver->setMemcached($memcached);
108+ $cacheDriver->save('cache_id', 'my_data');
109+
85110 Xcache
86111~~~~~~
87112
0 commit comments