Skip to content

Commit

Permalink
refactor(teler): init cache regardless dev opt
Browse files Browse the repository at this point in the history
Signed-off-by: Dwi Siswanto <git@dw1.io>
  • Loading branch information
dwisiswant0 committed Jun 6, 2024
1 parent 7ef72b6 commit 897f05e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions teler.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,9 @@ func New(opts ...Options) *Teler {
}
}

// If development mode is enabled, create a new cache with a default
// expiration time of 15 minutes and cleanup interval of 20 minutes.
if !o.Development {
t.cache = cache.New(15*time.Minute, 20*time.Minute)
}
// Initialize cache with a default expiration time of 15 minutes and cleanup
// interval of 20 minutes.
t.cache = cache.New(15*time.Minute, 20*time.Minute)

// If custom response status is set, overwrite default response status.
if o.Response.Status != 0 {
Expand Down

0 comments on commit 897f05e

Please sign in to comment.