Skip to content

Commit

Permalink
feature: ut
Browse files Browse the repository at this point in the history
  • Loading branch information
dspo committed Dec 17, 2021
1 parent 4a1a1f5 commit d812135
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/core-services/services/project/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ import (

type Cache struct {
sync.Map
expiredDuration time.Duration
C chan uint64
expired time.Duration
C chan uint64
}

func NewCache(expiredDuration time.Duration) *Cache {
return &Cache{expiredDuration: expiredDuration, C: make(chan uint64, 1000)}
return &Cache{expired: expiredDuration, C: make(chan uint64, 1000)}
}

func (c *Cache) Store(key interface{}, value *CacheItme) {
c.Map.Store(key, value)
value.UpdateExpiredTime(c.expiredDuration)
value.UpdateExpiredTime(c.expired)
}

type CacheItme struct {
Expand Down

0 comments on commit d812135

Please sign in to comment.