Prado\I18N\core\TCache_Lite::getCacheFile PHP Method

getCacheFile() public method

public getCacheFile ( )
    function getCacheFile()
    {
        return $this->_file;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Get the data from the cache.
  * @param string $catalogue The translation section.
  * @param string $culture The translation locale, e.g. "en_AU".
  * @param string $filename If the source is a file, this file's modified
  * time is newer than the cache's modified time, no cache hit.
  * @return mixed Boolean FALSE if no cache hit. Otherwise, translation
  * table data for the specified section and locale.
  */
 public function get($catalogue, $culture, $lastmodified = 0)
 {
     $ID = $this->getID($catalogue, $culture);
     $group = $this->getGroup($catalogue, $culture);
     $this->cache->_setFileName($ID, $group);
     $cache = $this->cache->getCacheFile();
     if (is_file($cache) == false) {
         return false;
     }
     $lastmodified = (int) $lastmodified;
     if ($lastmodified <= 0 || $lastmodified > filemtime($cache)) {
         return false;
     }
     //echo '@@ Cache hit: "'.$ID.'" : "'.$group.'"';
     //echo "<br>\n";
     return $this->cache->get($ID, $group);
 }