Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
91c161e5
Commit
91c161e5
authored
Feb 06, 2021
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't cache group files for 5s.
A stat of a cached file is cheap, no need to micro-optimise.
parent
0261558e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
group/group.go
group/group.go
+0
-5
No files found.
group/group.go
View file @
91c161e5
...
...
@@ -305,10 +305,7 @@ func Add(name string, desc *description) (*Group, error) {
if
desc
!=
nil
{
g
.
description
=
desc
}
else
if
time
.
Since
(
g
.
description
.
loadTime
)
<
5
*
time
.
Second
{
return
g
,
nil
}
else
if
!
descriptionChanged
(
name
,
g
.
description
)
{
g
.
description
.
loadTime
=
time
.
Now
()
return
g
,
nil
}
...
...
@@ -702,7 +699,6 @@ func matchClient(group string, c Challengeable, users []ClientCredentials) (bool
type
description
struct
{
fileName
string
`json:"-"`
loadTime
time
.
Time
`json:"-"`
modTime
time
.
Time
`json:"-"`
fileSize
int64
`json:"-"`
Description
string
`json:"description,omitempty"`
...
...
@@ -811,7 +807,6 @@ func GetDescription(name string) (*description, error) {
desc
.
fileName
=
fileName
desc
.
fileSize
=
fi
.
Size
()
desc
.
modTime
=
fi
.
ModTime
()
desc
.
loadTime
=
time
.
Now
()
return
&
desc
,
nil
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment