mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Revert "cache/dynacache: Prevent multiple concurrent resizes"
This reverts commit 564bae06f6
.
Thinking about it, the above doesn't make any sense/having any effect.
This commit is contained in:
parent
564bae06f6
commit
7ee0f70507
1 changed files with 1 additions and 8 deletions
9
cache/dynacache/dynacache.go
vendored
9
cache/dynacache/dynacache.go
vendored
|
@ -119,8 +119,7 @@ func (o OptionsPartition) CalculateMaxSize(maxSizePerPartition int) int {
|
|||
|
||||
// A dynamic partitioned cache.
|
||||
type Cache struct {
|
||||
mu sync.RWMutex
|
||||
resizeMu sync.Mutex
|
||||
mu sync.RWMutex
|
||||
|
||||
partitions map[string]PartitionManager
|
||||
|
||||
|
@ -232,12 +231,6 @@ func (c *Cache) Stop() {
|
|||
}
|
||||
|
||||
func (c *Cache) adjustCurrentMaxSize() {
|
||||
if !c.resizeMu.TryLock() {
|
||||
// Prevent multiple concurrent resizes.
|
||||
return
|
||||
}
|
||||
defer c.resizeMu.Unlock()
|
||||
|
||||
c.mu.RLock()
|
||||
defer c.mu.RUnlock()
|
||||
|
||||
|
|
Loading…
Reference in a new issue