Add stale cache fix
This commit is contained in:
parent
121c7eebe1
commit
f5684299c8
@ -159,6 +159,7 @@ func (uc *urlCache) refreshCache(
|
|||||||
|
|
||||||
// Issue a delta query to graph
|
// Issue a delta query to graph
|
||||||
logger.Ctx(ctx).Info("refreshing url cache")
|
logger.Ctx(ctx).Info("refreshing url cache")
|
||||||
|
startTime := time.Now()
|
||||||
|
|
||||||
err := uc.deltaQuery(ctx)
|
err := uc.deltaQuery(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -171,7 +172,7 @@ func (uc *urlCache) refreshCache(
|
|||||||
logger.Ctx(ctx).Info("url cache refreshed")
|
logger.Ctx(ctx).Info("url cache refreshed")
|
||||||
|
|
||||||
// Update last refresh time
|
// Update last refresh time
|
||||||
uc.lastRefreshTime = time.Now()
|
uc.lastRefreshTime = startTime
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user