'use strict' ; import BaseModel from '../bases/BaseModel' ; import { ITagsData } from 'teambition' ; class TagsModel extends BaseModel { public getCollection ( objectType , objectId ) { return this . _get < ITagsData [ ] > ( `tags:${ objectType }` , objectId ) ; } public setCollection ( objectType , objectId , collection ) { let cache = this . getCollection ( objectType , objectId ) ; if ( ! cache ) { this . _set ( `tags:${ objectType }` , objectId , collection ) ; } } } export default new TagsModel ( ) ;