Req #49131 [Opn->Wfx]: Cached functions (new feature to improve performance)
| From: | jani@php.net | Date: | Wed, 24 Nov 2010 14:05:39 +0000 |
| Subject: | Req #49131 [Opn->Wfx]: Cached functions (new feature to improve performance) | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-156389@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=49131&edit=1
ID: 49131
Updated by: jani@php.net
Reported by: vesomy at gmail dot com
Summary: Cached functions (new feature to improve
performance)
-Status: Open
+Status: Wont fix
Type: Feature/Change Request
-Package: Feature/Change Request
+Package: *General Issues
Operating System: Irrelevant
PHP Version: 6SVN-2009-08-01 (SVN)
Block user comment: N
Private report: N
New Comment:
There are several different 3rd party solutions for cacheing, use those.
Previous Comments:
------------------------------------------------------------------------
[2009-08-01 15:37:00] vesomy at gmail dot com
Description:
------------
Many functions perform operation like fetch data from database and
return value should be cached.
Standard solution:
function get_visible_pages(){
static $return = false;
if($return === false){
$return = fetch_visible_pages_from_db();
}
return $return;
}
I think php shold automate this in way like:
cached function get_visible_pages(){
$return = fetch_visible_pages_from_db();
return $return;
}
Thanks!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=49131&edit=1