private CollectionCache.CollectionInfo getInfo(long id) { System.Collections.Generic.IDictionary <long, CollectionInfo > dbCache = this.cache[this.db]; if (dbCache == null) { dbCache = new System.Collections.Generic.Dictionary <long, CollectionInfo >(); this.cache[this.db] = dbCache; } CollectionCache.CollectionInfo info = dbCache[id]; if (info == null || this.isExpired(info.time)) { try { string name = this.execute(id); info = new CollectionCache.CollectionInfo(name, new System.DateTime ().getTime()); dbCache[id] = info; } catch (ArangoDBException e) { LOGGER.error(e.Message, e); } } return(info); }
public virtual string getCollectionName(long id) { CollectionCache.CollectionInfo info = this.getInfo(id); return(info != null ? info.name : null); }