mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Add dump and restore functionality for internal DBs
This commit is contained in:
committed by
Dan Christian Bogos
parent
17248c5dde
commit
a168f262e2
@@ -84,7 +84,7 @@ func (eeS *EventExporterS) SetupExporterCache() error {
|
||||
continue // skip if caching is disabled
|
||||
}
|
||||
|
||||
expCache[chID] = ltcache.NewCache(chCfg.Limit, chCfg.TTL, chCfg.StaticTTL, onCacheEvicted)
|
||||
expCache[chID] = ltcache.NewCache(chCfg.Limit, chCfg.TTL, chCfg.StaticTTL, false, []func(itmID string, value any){onCacheEvicted})
|
||||
|
||||
// Precache exporters if required.
|
||||
if chCfg.Precache {
|
||||
|
||||
@@ -36,12 +36,12 @@ import (
|
||||
var failedPostCache *ltcache.Cache
|
||||
|
||||
func init() {
|
||||
failedPostCache = ltcache.NewCache(-1, 5*time.Second, false, writeFailedPosts) // configurable general
|
||||
failedPostCache = ltcache.NewCache(-1, 5*time.Second, false, false, []func(itmID string, value any){writeFailedPosts}) // configurable general
|
||||
}
|
||||
|
||||
// SetFailedPostCacheTTL recreates the failed cache
|
||||
func SetFailedPostCacheTTL(ttl time.Duration) {
|
||||
failedPostCache = ltcache.NewCache(-1, ttl, false, writeFailedPosts)
|
||||
failedPostCache = ltcache.NewCache(-1, ttl, false, false, []func(itmID string, value any){writeFailedPosts})
|
||||
}
|
||||
|
||||
func writeFailedPosts(_ string, value any) {
|
||||
|
||||
Reference in New Issue
Block a user