lib/cache.js
function meta_data_still_fresh(item) {
    var promise = read_meta_data(item).
    then(function(item) {
        return new Promise(function(resolve, reject) {
            if (headers_still_fresh(item.meta_data.headers)) {
                resolve(item);
            } else {
                reject(item);
            }
        });
    });

    return promise;
}
function meta_data_still_fresh(item) {
    var promise = read_meta_data(item).
    then(function(item) {
        return new Promise(function(resolve, reject) {
            if (headers_still_fresh(item.meta_data.headers)) {
                resolve(item);
            } else {
                reject(item);
            }
        });
    });

    return promise;
}
function meta_data_still_fresh ( item ) { var promise = read_meta_data ( item ) . then ( function ( item ) { return new Promise ( function ( resolve , reject ) { if ( headers_still_fresh ( item . meta_data . headers ) ) { resolve ( item ) ; } else { reject ( item ) ; } } ) ; } ) ; return promise ; }
returns a promise that resolves into the meta data or rejects in case of an error
returns a promise that resolves into the meta data or rejects in case of an error