protected function _getCachedFileContent() { $oCache = new Common_Cache_Cache(); $oTag = new Common_Cache_Tag(); $oTag->setTags(array('javascript')); //@todo to powinna być stała $oCache->setLifetime(1); //@todo ustawić to jakoś w konfigu na np. 99999999 $oCache->setSerialize(false); $sId = $oCache->getId(get_class($this), 'js-load', array()); $sResult = $oCache->load($sId); if ($sResult != false) { if ($oCache->getSerialize()) { $sResult = unserialize($sResult); } } else { $sResult = $this->_getFileContent(); $sNewResult = $oCache->getSerialize() ? serialize($sResult) : $sResult; $oCache->save($sNewResult, $sId, $oTag->getTags()); } return $sResult; }