Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
ui-middleware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Source Software
OX App Suite
Core
ui-middleware
Commits
70e26864
Commit
70e26864
authored
2 years ago
by
richard.petersen
Browse files
Options
Downloads
Patches
Plain Diff
fixed: file logging does not contain the requested file version
parent
edaf93ec
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/files.js
+4
-4
4 additions, 4 deletions
src/files.js
with
4 additions
and
4 deletions
src/files.js
+
4
−
4
View file @
70e26864
...
...
@@ -62,7 +62,7 @@ export function getFile ({ version, path }) {
// try to get the file synchronously.
const
data
=
cache
.
getCache
()[
key
]
if
(
data
)
{
logger
.
debug
(
`[Files] Resolve from memory:
${
path
}
`
)
logger
.
debug
(
`[Files] Resolve from memory:
${
key
}
`
)
return
data
}
...
...
@@ -78,21 +78,21 @@ export function getFile ({ version, path }) {
])
if
(
body
)
{
logger
.
debug
(
`[Files] Resolve from redis:
${
path
}
`
)
logger
.
debug
(
`[Files] Resolve from redis:
${
key
}
`
)
return
(
cache
.
getCache
()[
key
]
=
{
body
,
...
JSON
.
parse
(
meta
)
})
}
}
const
dataFromServer
=
await
fetchFileWithHeaders
({
version
,
path
})
if
(
redis
.
isEnabled
())
{
logger
.
debug
(
`[Files] Store in redis:
${
path
}
`
)
logger
.
debug
(
`[Files] Store in redis:
${
key
}
`
)
const
{
body
,
...
rest
}
=
dataFromServer
redis
.
client
.
set
(
bodyKey
,
createWritable
(
body
))
redis
.
client
.
set
(
metaKey
,
JSON
.
stringify
(
rest
))
}
// overwrite cache with synchronous data
logger
.
debug
(
`[Files] Store in memory:
${
path
}
`
)
logger
.
debug
(
`[Files] Store in memory:
${
key
}
`
)
return
(
cache
.
getCache
()[
key
]
=
dataFromServer
)
})()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment