Leaseweb / LswMemcacheBundle

Symfony bundle for Memcache Doctrine caching and session storage in the Web Debug Toolbar.
MIT License
202 stars 57 forks source link

fix doc example of setting a memcached entry #60

Closed dbu closed 8 years ago

dbu commented 8 years ago

according to the interfaces and to my testing, the lifetime comes before the options.

mevdschee commented 8 years ago

Good catch! Thank you very much.

mevdschee commented 8 years ago

The documentation of the memcache(without "d") pear plugin states that the TTL is the fourth parameter. I verified this in the C source code.

See: http://git.php.net/?p=pecl/caching/memcache.git;a=blob;f=memcache.c;h=6a7576d1a86fdbeaf8f30c3cfd54ac642719c006;hb=HEAD#l2316

dbu commented 8 years ago

uh. is that memcache or memcached? but i am pretty conclusive that the version i tested as well as the interfaces in the codegen folder indicate the 3rd parameter really is the lifetime and not flags.

mevdschee commented 8 years ago

Ah.. yes, the older version that exposes the memcached object (not the memcache object) indeed had that order of parameters. The documentation has been adjusted to the new functionality (version 2 and up) and you must refer to the old functionality (version 1). I hope that clears things up. Nevertheless I would like to thank you for your participation, it is much appreciated!