fixed cache invalidation

This commit is contained in:
2021-10-14 23:46:48 +02:00
parent 439e5473b6
commit 8c6f59a6b4
3 changed files with 9 additions and 8 deletions

View File

@@ -195,8 +195,9 @@ func httpPostFile(ctx context.Context, rw http.ResponseWriter, r *http.Request)
return
}
// Invalidate cache
ctx.Value("loader").(*loader.Loader).InvalidateCacheForFile(ctx, *id)
loader := ctx.Value("loader").(*loader.Loader)
loader.InvalidateCacheForFile(ctx, *id)
loader.InvalidateCacheForDir(ctx, *id.Parent())
rw.WriteHeader(http.StatusCreated)
}