fixed cache invalidation
This commit is contained in:
@@ -146,17 +146,17 @@ func (l *Loader) GetFilesRecursive(ctx context.Context, path types.ID) ([]types.
|
||||
}
|
||||
|
||||
func (l *Loader) InvalidateCacheForFile(ctx context.Context, id types.ID) {
|
||||
log.Debug("Clear cache for file:", id.String())
|
||||
log.Debug("Clear cache for file: ", id.String())
|
||||
parent := id.Parent()
|
||||
|
||||
l.listObjectsLoader.Clear(ctx, id)
|
||||
l.listObjectsRecursiveLoader.Clear(ctx, parent)
|
||||
l.statObjectLoader.Clear(ctx, id)
|
||||
l.listObjectsLoader.Clear(ctx, id).Clear(ctx, parent)
|
||||
}
|
||||
|
||||
func (l *Loader) InvalidateCacheForDir(ctx context.Context, path types.ID) {
|
||||
log.Debug("Clear cache for dir:", path.String())
|
||||
log.Debug("Clear cache for dir: ", path.String())
|
||||
parent := helper.GetParentDir(path)
|
||||
|
||||
l.listBucketsLoader.Clear(ctx, path).Clear(ctx, parent)
|
||||
l.listObjectsLoader.Clear(ctx, path).Clear(ctx, parent)
|
||||
l.listObjectsRecursiveLoader.Clear(ctx, path).Clear(ctx, parent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user