cvs: php4 /pear/Cache Function.php

From: Date: Fri, 02 Mar 2001 08:25:13 +0000
Subject: cvs: php4 /pear/Cache Function.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4329@lists.php.net to get a copy of this message
sbergmann Fri Mar 2 00:25:13 2001 EDT Modified files: /php4/pear/Cache Function.php Log: Added PHPDoc doccomments. Index: php4/pear/Cache/Function.php diff -u php4/pear/Cache/Function.php:1.3 php4/pear/Cache/Function.php:1.4 --- php4/pear/Cache/Function.php:1.3 Fri Mar 2 00:18:35 2001 +++ php4/pear/Cache/Function.php Fri Mar 2 00:25:12 2001 @@ -15,9 +15,49 @@ // | Authors: Sebastian Bergmann <sb@sebastian-bergmann.de> | // +----------------------------------------------------------------------+ // -// $Id: Function.php,v 1.3 2001/03/02 08:18:35 sbergmann Exp $ +// $Id: Function.php,v 1.4 2001/03/02 08:25:12 sbergmann Exp $ require_once 'Cache.php'; + +/** +* Function_Cache +* +* Purpose: +* +* Caching the result and output of functions. +* +* Example: +* +* require_once "Cache/Function.php"; +* +* function foo($string) +* { +* print $string . "<br>"; +* for($i=1;$i<10000000;$i++){} +* return strrev($string); +* } +* +* print cached_function_call("foo", "test"); +* +* Note: +* +* You cannot cache every function. You should only cache +* functions that only depend on their arguments and don't use +* global or static variables, don't rely on database queries or +* files, and so on. +* +* @author Sebastian Bergmann <sb@sebastian-bergmann.de> +* @module Function_Cache +* @version $Revision: 1.4 $ +* @access public +*/ + +/** +* Calls a cacheable function or method. +* +* @return mixed $result +* @access public +*/ function cached_function_call() {

« previous php.cvs (#4329) next »