Der Cash wird automatisch alle 12 Stunden geleert.
Wir nutzen
Code
- // cache subfolder(group) 'convertECB', cache method: callback
- $cache= JFactory::getCache('convertECB','callback');
- // save configured lifetime
- @$lifetime=$cache->lifetime;
- $cache->setLifeTime(86400/4); // check 4 time per day
- // save cache conf
- $conf = JFactory::getConfig();
- // check if cache is enabled in configuration
- $cacheactive = $conf->getValue('config.caching');
- $cache->setCaching(1); //enable caching
- $globalCurrencyConverter = $cache->call( array( 'convertECB', 'getSetExchangeRates' ),$this->document_address );
- // revert configuration
- $cache->setCaching($cacheactive);
Wir missbrauchen den Cache nur. Die Laufzeit ist 6 Stunden.