forked from TrueCloudLab/frostfs-s3-gw
[#405] English Check
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
This commit is contained in:
parent
a0a04a73bd
commit
bf38007692
42 changed files with 205 additions and 205 deletions
8
api/cache/accessbox.go
vendored
8
api/cache/accessbox.go
vendored
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
type (
|
||||
// AccessBoxCache stores access box by its address.
|
||||
// AccessBoxCache stores an access box by its address.
|
||||
AccessBoxCache struct {
|
||||
cache gcache.Cache
|
||||
}
|
||||
|
@ -24,11 +24,11 @@ type (
|
|||
const (
|
||||
// DefaultAccessBoxCacheSize is a default maximum number of entries in cache.
|
||||
DefaultAccessBoxCacheSize = 100
|
||||
// DefaultAccessBoxCacheLifetime is a default lifetime of entries in cache.
|
||||
// DefaultAccessBoxCacheLifetime is a default lifetime of entries in cache.
|
||||
DefaultAccessBoxCacheLifetime = 10 * time.Minute
|
||||
)
|
||||
|
||||
// DefaultAccessBoxConfig return new default cache expiration values.
|
||||
// DefaultAccessBoxConfig returns new default cache expiration values.
|
||||
func DefaultAccessBoxConfig() *Config {
|
||||
return &Config{Size: DefaultAccessBoxCacheSize, Lifetime: DefaultAccessBoxCacheLifetime}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ func NewAccessBoxCache(config *Config) *AccessBoxCache {
|
|||
return &AccessBoxCache{cache: gc}
|
||||
}
|
||||
|
||||
// Get returns cached object.
|
||||
// Get returns a cached object.
|
||||
func (o *AccessBoxCache) Get(address *address.Address) *accessbox.Box {
|
||||
entry, err := o.cache.Get(address.String())
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue