src/compiler/CCCache.js
/**
 * The constructor function for {@link CCCache}. This class is a singleton per cache folder to avoid concurrency on
 * file system level.
 *
 * @classdesc This class is responsible for caching compilation units.
 *
 * @constructor
 *
 * @param {!string} cacheFolder A folder path where CCBuild stores all cached content.
 * @throws {Error} Thrown if cacheFolder is an empty string.
 */
The constructor function for  CCCache. This class is a singleton per cache folder to avoid concurrency on
file system level.

@classdesc This class is responsible for caching compilation units.

@constructor

@param {!string} cacheFolder A folder path where CCBuild stores all cached content.
@throws {Error} Thrown if cacheFolder is an empty string.
The constructor function for CCCache . This class is a singleton per cache folder to avoid concurrency on file system level . @classdesc This class is responsible for caching compilation units . @constructor @param { !string } cacheFolder A folder path where CCBuild stores all cached content . @throws { Error } Thrown if cacheFolder is an empty string .
function CCCache (cacheFolder) {
    var normalizedCacheFolderString = cacheFolder.trim();
    if (normalizedCacheFolderString.length === 0) {
        throw new Error('"cacheFolder" must not be an empty string');
    }
    var normalizedCacheFolder = path.resolve(normalizedCacheFolderString);
    if (instances[normalizedCacheFolder]) {
        return instances[normalizedCacheFolder];
    } else {
        instances[normalizedCacheFolder] = this;
    }
    this._cacheFolder = normalizedCacheFolder;
    this._bibliography = {};
    this._readBibliographyPromise = null;
    this._persistPromise = Q.resolve();
}
function CCCache ( cacheFolder ) { var normalizedCacheFolderString = cacheFolder . trim ( ) ; if ( normalizedCacheFolderString . length === 0 ) { throw new Error ( '"cacheFolder" must not be an empty string' ) ; } var normalizedCacheFolder = path . resolve ( normalizedCacheFolderString ) ; if ( instances [ normalizedCacheFolder ] ) { return instances [ normalizedCacheFolder ] ; } else { instances [ normalizedCacheFolder ] = this ; } this . _cacheFolder = normalizedCacheFolder ; this . _bibliography = { } ; this . _readBibliographyPromise = null ; this . _persistPromise = Q . resolve ( ) ; }
The constructor function for {@link CCCache}.
The constructor function for { @link CCCache } .