[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Cache/Lite/ -> Function.php (sommaire)

This class extends Cache_Lite and can be used to cache the result and output of functions/methods

Author: Sebastian BERGMANN <sb@sebastian-bergmann.de>
Author: Fabien MARTY <fab@php.net>
Version: $Id: Function.php,v 1.10 2006/02/04 18:36:36 fab Exp $
Poids: 211 lignes (7 kb)
Inclus ou requis: 5 fois
Référencé: 0 fois
Nécessite: 1 fichier
 Cache/Lite.php

Définit 1 class

Cache_Lite_Function:: (4 méthodes):
  Cache_Lite_Function()
  call()
  drop()
  _makeId()


Classe: Cache_Lite_Function  - X-Ref

Cache_Lite_Function($options = array(NULL)   X-Ref
Constructor

$options is an assoc. To have a look at availables options,
see the constructor of the Cache_Lite class in 'Cache_Lite.php'

Comparing to Cache_Lite constructor, there is another option :
$options = array(
(...) see Cache_Lite constructor
'debugCacheLiteFunction' => (bool) debug the caching process,
'defaultGroup' => default cache group for function caching (string),
'dontCacheWhenTheOutputContainsNOCACHE' => (bool) don't cache when the function output contains "NOCACHE",
'dontCacheWhenTheResultIsFalse' => (bool) don't cache when the function result is false,
'dontCacheWhenTheResultIsNull' => (bool don't cache when the function result is null
);

param: array $options options

call()   X-Ref
Calls a cacheable function or method (or not if there is already a cache for it)

Arguments of this method are read with func_get_args. So it doesn't appear
in the function definition. Synopsis :
call('functionName', $arg1, $arg2, ...)
(arg1, arg2... are arguments of 'functionName')

return: mixed result of the function/method

drop()   X-Ref
Drop a cache file

Arguments of this method are read with func_get_args. So it doesn't appear
in the function definition. Synopsis :
remove('functionName', $arg1, $arg2, ...)
(arg1, arg2... are arguments of 'functionName')

return: boolean true if no problem

_makeId($arguments)   X-Ref
Make an id for the cache

return: string id



Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7