more cache issues
This commit is contained in:
@@ -30,7 +30,7 @@ func deleteMutation(ctx context.Context, id types.ID) error {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx.Value("loader").(*loader.Loader).InvalidateCacheForFile(ctx, id)
|
||||
ctx.Value("loader").(*loader.Loader).InvalidedCacheForId(ctx, id)
|
||||
|
||||
return nil
|
||||
}
|
||||
@@ -69,7 +69,7 @@ func copyMutation(ctx context.Context, src, dest types.ID) (*types.File, error)
|
||||
|
||||
newID.Normalize()
|
||||
|
||||
ctx.Value("loader").(*loader.Loader).InvalidateCacheForFile(ctx, newID)
|
||||
ctx.Value("loader").(*loader.Loader).InvalidedCacheForId(ctx, newID)
|
||||
|
||||
return &types.File{
|
||||
ID: newID,
|
||||
@@ -121,11 +121,16 @@ func moveDirMutation(ctx context.Context, src, dest types.ID) ([]*types.File, er
|
||||
|
||||
deleteMutation(ctx, file.ID)
|
||||
|
||||
loader.InvalidedCacheForId(ctx, newID)
|
||||
loader.InvalidedCacheForId(ctx, file.ID)
|
||||
|
||||
result = append(result, &types.File{
|
||||
ID: newID,
|
||||
})
|
||||
}
|
||||
|
||||
loader.InvalidedCacheForId(ctx, src)
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
@@ -170,7 +175,7 @@ func moveFileMutation(ctx context.Context, src, dest types.ID) (*types.File, err
|
||||
|
||||
newId.Normalize()
|
||||
|
||||
ctx.Value("loader").(*loader.Loader).InvalidateCacheForFile(ctx, newId)
|
||||
ctx.Value("loader").(*loader.Loader).InvalidedCacheForId(ctx, newId)
|
||||
|
||||
return &types.File{
|
||||
ID: newId,
|
||||
@@ -201,7 +206,7 @@ func createDirectory(ctx context.Context, id types.ID) (*types.Directory, error)
|
||||
|
||||
newID.Normalize()
|
||||
|
||||
ctx.Value("loader").(*loader.Loader).InvalidateCacheForDir(ctx, newID)
|
||||
ctx.Value("loader").(*loader.Loader).InvalidedCacheForId(ctx, newID)
|
||||
|
||||
return &types.Directory{
|
||||
ID: newID,
|
||||
@@ -254,7 +259,7 @@ func deleteDirectory(ctx context.Context, id types.ID) error {
|
||||
}
|
||||
}
|
||||
|
||||
loader.InvalidateCacheForDir(ctx, id)
|
||||
loader.InvalidedCacheForId(ctx, id)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user