Cache_Lite_Function::call()

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

Synopsis

require_once 'Cache/Lite/Function.php';

mixed Cache_Lite_Function::call (string$functionName, mixed$arg1, mixed$arg2, mixed$arg3, mixed...)

Описание

call the given function with given arguments only if there is no cache about it ; else, the output of the function is read from the cache then send to the browser and the return value if read also from the cache and returned.

Возвращаемое значение

returns result of the function/method

Заметка

Эта функция не должна вызываться статически.

Пример

Пример

If you try to use Cache_Lite_Function with $this object ($cache->call('this->method',...) for example), have a look first at the last example of this page.

Пример

Пример

So, for method calls, the best way is to use array(&$object, 'nameOfTheMethod') as first argument instead of '$object->nameOfTheMethod' which doesn't work with "$this" for example.


HIVE: All information for read only. Please respect copyright!
Hosted by hive йца: йХЕБЯЙЮЪ ЦНПНДЯЙЮЪ АХАКХНРЕЙЮ