static async updateCache(category) {
        checkParam(category, 'category', String, true);
            
        if(!cache[category]) { return; }
       
        cache[category] = { isUpdating: true, items: {} };

        try {
            let resources = await this.getAll(null, category);

            for(let resource of resources) {
                cache[category]['items'][resource.id] = resource;
            }
        
        } catch(e) {
            debug.error(e, this, true);

        } finally {
            cache[category]['isUpdating'] = false;

        }
    }
/**
     * Adds a resource to the cache
     *
     * @param {String} category
     */
Adds a resource to the cache
@param {String} category
Adds a resource to the cache @param { String } category
static async updateCache(category) {
        checkParam(category, 'category', String, true);
        if(!cache[category]) { return; }
        cache[category] = { isUpdating: true, items: {} };
        try {
            let resources = await this.getAll(null, category);
            for(let resource of resources) {
                cache[category]['items'][resource.id] = resource;
            }
        } catch(e) {
            debug.error(e, this, true);
        } finally {
            cache[category]['isUpdating'] = false;
        }
    }
static async updateCache ( category ) { checkParam ( category , 'category' , String , true ) ; if ( ! cache [ category ] ) { return ; } cache [ category ] = { isUpdating : true , items : { } } ; try { let resources = await this . getAll ( null , category ) ; for ( let resource of resources ) { cache [ category ] [ 'items' ] [ resource . id ] = resource ; } } catch ( e ) { debug . error ( e , this , true ) ; } finally { cache [ category ] [ 'isUpdating' ] = false ; } }
Adds a resource to the cache
 @param {String} category
Adds a resource to the cache @param { String } category