Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1021


Ignore:
Timestamp:
12/17/08 19:27:35 (16 years ago)
Author:
svonolfe
Message:

Fixed caching mechanism of jobs (#372)

Location:
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/CachedDataAdapter.cs

    r995 r1021  
    171171          UpdateRow(row);
    172172          RemoveRowFromCache(row);
     173        } else if (!IsCached(row) &&
     174          PutInCache(obj)) {
     175          //add to cache
     176          cache.Rows.Add(row);
    173177        }
    174178
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/JobAdapter.cs

    r1005 r1021  
    106106      if (job != null && row != null) {
    107107        if (job.Client != null) {
    108           ClientAdapter.Update(job.Client);
    109           row.ResourceId = job.Client.Id;
     108          if (row.IsResourceIdNull() ||
     109            row.ResourceId != job.Client.Id) {
     110            ClientAdapter.Update(job.Client);
     111            row.ResourceId = job.Client.Id;
     112          }
    110113        } else
    111114          row.SetResourceIdNull();
    112115
    113116        if (job.ParentJob != null) {
    114           Update(job.ParentJob);
    115           row.ParentJobId = job.ParentJob.Id;
     117          if (row.IsParentJobIdNull() ||
     118            row.ParentJobId != job.ParentJob.Id) {
     119            Update(job.ParentJob);
     120            row.ParentJobId = job.ParentJob.Id;
     121          }
    116122        } else
    117123          row.SetParentJobIdNull();
Note: See TracChangeset for help on using the changeset viewer.