previousconstructor Cache_Lite_Output::
Cache_Lite_Output
(Previous)
(Next) Cache_Lite_Output::endnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Cache_Lite_Output::start

Cache_Lite_Output::start() – Teste si un cache est disponible et (si oui) le retourne au navigateur. Sinon, la bufferisation de la sortie est activée.

Synopsis

require_once 'Cache/Lite/Output.php';

boolean Cache_Lite_Output::start ( string $id , string $group = 'default' , boolean $doNotTestCacheValidity = = false )

Description

Teste si un cache est disponible et (si oui) le retourne au navigateur. Sinon, la beufferisation de la sortie est activée.

Parameter

string $id

identifiant du cache

string $group

nom du groupe de cache

boolean $doNotTestCacheValidity

Si défini à TRUE, la validité du cache ne sera pas testée

Return value

Retourne TRUE si le cache est disponible (FALSE sinon)

Note

This function can not be called statically.

Example

Utilisation

<?php
require_once "Cache/Lite/Output.php";

$options = array(
    
'cacheDir' => '/tmp/',
    
'lifeTime' => 7200,
    
'pearErrorMode' => CACHE_LITE_ERROR_DIE
);
$cache = new Cache_Lite_Output($options);

if (!(
$cache->start('id_of_the_page'))) {

    
// Cache non présent !
    // Toute la sortie est beufferisée en attendant la méthode end()
    // (...)

    
$cache->end();

}

?>
previousconstructor Cache_Lite_Output::
Cache_Lite_Output
(Previous)
(Next) Cache_Lite_Output::endnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.