mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02: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:
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()
|
||||
|
||||
|
Reference in New Issue
Block a user