Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
samizdat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
Michał "rysiek" Woźniak
samizdat
Commits
51a2c2f1
Commit
51a2c2f1
authored
4 years ago
by
Michał "rysiek" Woźniak
Browse files
Options
Downloads
Patches
Plain Diff
WIP
#71
: cache self.log() bugfix
parent
2f047a0b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/cache.js
+6
-8
6 additions, 8 deletions
plugins/cache.js
with
6 additions
and
8 deletions
plugins/cache.js
+
6
−
8
View file @
51a2c2f1
...
...
@@ -23,7 +23,7 @@
* getting content from cache
*/
let
getContentFromCache
=
(
url
)
=>
{
self
.
log
(
config
.
name
,
'
getting from cache
!
'
)
self
.
log
(
config
.
name
,
`
getting from cache
:
${
url
}
`
)
return
caches
.
open
(
'
v1
'
)
.
then
((
cache
)
=>
{
return
cache
.
match
(
url
)
...
...
@@ -32,13 +32,11 @@
if
(
typeof
response
===
'
undefined
'
)
{
throw
new
Error
(
'
Resource not found in cache
'
);
}
else
{
self
.
log
(
config
.
name
,
'
retrieved cached headers:
\n
'
,
response
.
headers
.
map
((
v
,
k
)
=>
{
return
`
${
k
}
:
${
v
}
`
}).
join
(
'
\n
+--
'
)
)
var
msg
=
'
retrieved cached headers:
'
response
.
headers
.
forEach
((
v
,
k
)
=>
{
msg
+=
`\n+--
${
k
}
:
${
v
}
`
})
self
.
log
(
config
.
name
,
msg
)
// return the response
return
response
}
...
...
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