/** * Compiles the CSS using the engine and caches the result * @access public * @param $source Scaffold_Source * @return array */ public function compile(Scaffold_Source $source) { $id = $source->id(); $modified = $source->last_modified(); $expired = $this->cache->expired($id, $modified); if ($this->production === false or $expired === true) { $this->cache->set($id, $this->parse($source)); } $result = array(); $result['string'] = $this->cache->get($id); $result['last_modified'] = $this->cache->modified($id); return $result; }
/** * Saves the contents of the source object * @access public * @param $source Scaffold_Source * @return void */ public function save(Scaffold_Source $source) { $this->cache->set($source->id, $source->contents, $source->last_modified); }