declare namespace datasources {
  class EntityCacheEntry<T extends IEntity = IEntity> {
    constructor(inTimeStamp: Date, inRawEntry: T, inStamp: number);
    GetTimeStamp(): Date;
  }

  class EntityCache<T extends IEntity = IEntity> {
    fMaxEntities: number;
    fTimeOut: number;
    fCurStamp: number;
    fCache: number;

    getNextStamp(): number;
    makeRoomFor(nbEntites: number): void;
    clear(nbToClear: number): void;
    clearAll(): void;
    setEntry(inKey: string, inRawEntry: T, inTimeStamp: Date);
    retainEntry(inKey: string, inCacheDelay: number): T;
    removeEntry(inKey: string): void;
    setMaxEntries(nbentries: number, canReduce: boolean): void;
    setTimeOut(inTimeout: number): void;

    static cloneRawEntity(rawEntityDef: T): T;
    static getTimeStamp(): Date;
  }
}
