Doc #70992 [Nab]: Wrong documentation
| From: | fekzol dot 13ker at gmail dot com | Date: | Sun, 29 Nov 2015 16:00:05 +0000 |
| Subject: | Doc #70992 [Nab]: Wrong documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-12892@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
User updated by: fekzol dot 13ker at gmail dot com
Reported by: fekzol dot 13ker at gmail dot com
Summary: Wrong documentation
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:
alright, got it. I bit missleading but ok.
Previous Comments:
------------------------------------------------------------------------
[2015-11-29 12:16:00] salathe@php.net
Also, we have a page dedicated to Memcached expiration times:
php.net/manual/en/memcached.expiration.php
------------------------------------------------------------------------
[2015-11-29 02:32:48] requinix@php.net
Both are acceptable to memcache: 300 is like a TTL while time()+300 is like an expiration.
------------------------------------------------------------------------
[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