public function cacheFile($cacheKey, $fileContents) {

        // Get directory and filename
        list($directory, $filename) = $this->getDirectoryAndFilenameFromKey($cacheKey);

        // Make the cache directory
        if (!file_exists($directory)) mkdir($directory, 0777, true);

        // Save the file
        file_put_contents($directory . "/" . $filename, $fileContents);

    }
public function cacheFile($cacheKey, $fileContents) {

        // Get directory and filename
        list($directory, $filename) = $this->getDirectoryAndFilenameFromKey($cacheKey);

        // Make the cache directory
        if (!file_exists($directory)) mkdir($directory, 0777, true);

        // Save the file
        file_put_contents($directory . "/" . $filename, $fileContents);

    }
public function cacheFile ( $ cacheKey , $ fileContents ) { // Get directory and filename list ( $ directory , $ filename ) = $ this -> getDirectoryAndFilenameFromKey ( $ cacheKey ) ; // Make the cache directory if ( ! file_exists ( $ directory ) ) mkdir ( $ directory , 0777 , true ) ; // Save the file file_put_contents ( $ directory . "/" . $ filename , $ fileContents ) ; }
Cache a file using the file contents - overwrite if necessary.

@param $cacheKey
@param $fileContents
Cache a file using the file contents - overwrite if necessary .