Doc #70992 [Opn->Nab]: Wrong documentation
| From: | requinix@php.net | Date: | Sun, 29 Nov 2015 02:32:49 +0000 |
| Subject: | Doc #70992 [Opn->Nab]: Wrong documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12890@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70992&edit=1
ID: 70992
Updated by: requinix@php.net
Reported by: fekzol dot 13ker at gmail dot com
Summary: Wrong documentation
-Status: Open
+Status: Not a bug
Type: Documentation Problem
Package: memcache
Operating System: Ubuntu 14.04
PHP Version: 5.6Git-2015-11-28 (snap)
Block user comment: N
Private report: N
New Comment:
Both are acceptable to memcache: 300 is like a TTL while time()+300 is like an expiration.
Previous Comments:
------------------------------------------------------------------------
[2015-11-28 22:49:07] fekzol dot 13ker at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/memcached.set
---
The exmaple code is wrong:
/* expire 'object' key in 5 minutes */
$m->set('object', new stdclass, time() + 300);
Test script:
---------------
The example is wrong.
$m->set('object', new stdclass, time() + 300);
If you want to store the data for 5 minute, you have to do this:
/* expire 'object' key in 5 minutes */
$m->set('object', new stdclass, 300);
Not: time() + 300;
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70992&edit=1