/**
  * Try to get the CSS from cache.
  * If it's not there re-generate it and save it to cache
  * If we are in preview mode, recompile the css using the theme present in the url.
  *
  */
 private function get_compiled_css()
 {
     try {
         // If we want to force a recompile, we throw an exception.
         if ($this->preview_mode === true || self::PARSE_LESS_FILES_AT_EVERY_REQUEST === true) {
             throw new Ai1ec_Cache_Not_Set_Exception();
         } else {
             // This throws an exception if the key is not set
             $css = $this->persistance_context->get_data_from_persistence();
             return $css;
         }
     } catch (Ai1ec_Cache_Not_Set_Exception $e) {
         // If we are in preview mode we force a recompile and we pass the variables.
         if ($this->preview_mode) {
             return $this->lessphp_controller->parse_less_files($this->lessphp_controller->get_less_variable_data_from_config_file(Ai1ec_Less_Factory::create_less_file_instance(Ai1ec_Less_File::USER_VARIABLES_FILE)));
         } else {
             $css = $this->lessphp_controller->parse_less_files();
         }
         try {
             $this->update_persistence_layer($css);
             return $css;
         } catch (Ai1ec_Cache_Write_Exception $e) {
             // If something is really broken, still return the css.
             // This means we parse it every time. This should never happen.
             return $css;
         }
     }
 }