ferret.js
function(ferret, collection_name, callback) {
    _ready(ferret, function(err) {
        if (err) {
            process.nextTick(function() {
                callback(err)  
            })
        } else {
            if (ferret._collections[collection_name]) {
                process.nextTick(function() {
                    callback(null, ferret._collections[collection_name])
                })
            } else {
                ferret._db.collection(collection_name, function(err, collection){
                    if (!err) { ferret._collections[collection_name] = collection }
                    callback(err, collection)
                })
            }
        }
    })
}
function(ferret, collection_name, callback) {
    _ready(ferret, function(err) {
        if (err) {
            process.nextTick(function() {
                callback(err)  
            })
        } else {
            if (ferret._collections[collection_name]) {
                process.nextTick(function() {
                    callback(null, ferret._collections[collection_name])
                })
            } else {
                ferret._db.collection(collection_name, function(err, collection){
                    if (!err) { ferret._collections[collection_name] = collection }
                    callback(err, collection)
                })
            }
        }
    })
}
function ( ferret , collection_name , callback ) { _ready ( ferret , function ( err ) { if ( err ) { process . nextTick ( function ( ) { callback ( err ) } ) } else { if ( ferret . _collections [ collection_name ] ) { process . nextTick ( function ( ) { callback ( null , ferret . _collections [ collection_name ] ) } ) } else { ferret . _db . collection ( collection_name , function ( err , collection ) { if ( ! err ) { ferret . _collections [ collection_name ] = collection } callback ( err , collection ) } ) } } } ) }
Try loading a collection from the cache. If that fails, get it from the driver
Try loading a collection from the cache . If that fails get it from the driver