Edit report at http://bugs.php.net/bug.php?id=49131&edit=1

 ID:                 49131
 Updated by:         [email protected]
 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

Reply via email to