anchor.diff:  end;
   
   procedure TCacheMem.CheckMaxMemUsage;
  +var LTick : TTickCount;
  +  LMillis,
  +  LOldCacheDataBlocks,
  +  LOldCacheDataSize : Int64;
   begin
     if ((FMaxCacheSize < 0) or (FCacheDataSize<=FMaxCacheSize))
        and
        ((FMaxCacheDataBlocks < 0) or (FCacheDataBlocks<=FMaxCacheDataBlocks)) then Exit;
  -  // When calling FreeMem will increase call in order to speed
  -  if not FreeMem((FMaxCacheSize-1) SHR 1, (FMaxCacheDataBlocks-1) SHR 1) then begin
  -    raise ECacheMem.Create(Format('FreeMem(%d -> %d,%d -> %d)=False',[FCacheDataSize,(FMaxCacheSize-1) SHR 1,FCacheDataBlocks,(FMaxCacheDataBlocks-1) SHR 1]));
  +  LOldCacheDataBlocks :=  FCacheDataBlocks;
  +  LOldCacheDataSize := FCacheDataSize;
  +  LTick := TPlatform.GetTickCount;
  +  try
  +    // When calling FreeMem will increase call in order to speed
  +    if not FreeMem((FMaxCacheSize-1) SHR 1, (FMaxCacheDataBlocks-1) SHR 1) then begin
  +      raise ECacheMem.Create(Format('FreeMem(%d -> %d,%d -> %d)=False',[FCacheDataSize,(FMaxCacheSize-1) SHR 1,FCacheDataBlocks,(FMaxCacheDataBlocks-1) SHR 1]));
  +    end;
  +  finally
  +    LMillis := TPlatform.GetElapsedMilliseconds(LTick);
  +    if Assigned(FOnFlushedCache) then begin
  +      FOnFlushedCache(Self,Format('CheckedMaxMemUsage from %d bytes / %d blocks to %d bytes / %d blocks in %d millis',
  +        [LOldCacheDataSize,LOldCacheDataBlocks,FCacheDataSize,FCacheDataBlocks,LMillis]),LMillis);
  +    end;
     end;
   end;
   
  
positive.code:         Inc(FCacheMemStats.saveDataCallsCount);
          Inc(FCacheMemStats.saveDataCallsBytes,PToCurrent^.GetSize);
          {$ENDIF}
          if FOnSaveDataProc(PToCurrent^.buffer[0],PToCurrent^.startPos,PToCurrent^.GetSize)<>PToCurrent^.GetSize then begin
            Result := False;
            inc(LTotalBytesError,Int64(PToCurrent^.GetSize));
  
negative.code:     property CacheMemStats : TCacheMemStats read FCacheMemStats;
      {$ENDIF}
      function GetStatsReport(AClearStats : Boolean) : String;
      property OnFlushedCache : TOnFinalizedCacheProc read FOnFlushedCache write FOnFlushedCache;
    End;
  
  implementation
  