note 106822 added to function.apc-store
| From: | pere dot cil dot remove dot this at wanadoo dot fr | Date: | Fri, 09 Dec 2011 09:49:41 +0000 |
| Subject: | note 106822 added to function.apc-store | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184991@lists.php.net to get a copy of this message | ||
Note that caching resources is not possible; even if the apc cache doesn't seems to call the
serialize / unserialize functions, that doesn't means that resources can be cached!
Small non-working example:
<?php
// Setter code
$r = fopen( '/tmp/test.txt', 'r' );
var_dump( $r );
apc_store( 'test', $r );
?>
<?php
// Getter code
$d = apc_fetch( 'test' );
var_dump( $d );
echo fread( $d, 1024 );
?>
var_dump( $d ) returns Resource #n of type (Unknown). The resource is still here, but unavailable.
----
Server IP: 89.31.146.176
Probable Submitter: 82.231.134.87
----
Manual Page -- http://www.php.net/manual/en/function.apc-store.php
Edit -- https://master.php.net/note/edit/106822
Del: integrated -- https://master.php.net/note/delete/106822/integrated
Del: useless -- https://master.php.net/note/delete/106822/useless
Del: bad code -- https://master.php.net/note/delete/106822/bad+code
Del: spam -- https://master.php.net/note/delete/106822/spam
Del: non-english -- https://master.php.net/note/delete/106822/non-english
Del: in docs -- https://master.php.net/note/delete/106822/in+docs
Del: other reasons-- https://master.php.net/note/delete/106822
Reject -- https://master.php.net/note/reject/106822
Search -- https://master.php.net/manage/user-notes.php