public function save($resourceKey, $resourceVersion = false, $fileExtension = '')
 {
     $dirname = 'mainio_minco_combined_assets';
     $url = MINCO_RESOURCES_SAVE_DIR_REL . '/' . $dirname;
     $saveDir = MINCO_RESOURCES_SAVE_DIR . '/' . $dirname;
     Loader::library("minco_file_writer", "mainio_minco");
     $file = MincoFileWriter::writeStatic($resourceKey, $resourceVersion, $fileExtension, $saveDir);
     return $url . '/' . $file;
 }
Exemple #2
0
<?php

defined('C5_EXECUTE') or die(_("Access Denied."));
Loader::library("minco_file_writer", "mainio_minco");
MincoFileWriter::respondMinifyRequest();
 private static function _checkClientCache()
 {
     require_once 'HTTP/ConditionalGet.php';
     $cgOptions = array('lastModifiedTime' => 0, 'isPublic' => true, 'encoding' => '', 'maxAge' => 1800);
     $cg = new HTTP_ConditionalGet($cgOptions);
     if (MINCO_CLIENT_CACHE && $cg->cacheIsValid) {
         // client's cache is valid
         $cg->sendHeaders();
         return true;
     } else {
         // client will need output
         self::$_headers = $cg->getHeaders();
         unset($cg);
     }
     return false;
 }