fix: Implement persistent caching for config table retrieval (#2044)

Co-authored-by: Nitesh Balla <nitesh.balla@juspay.in>
Co-authored-by: Narayan Bhat <48803246+Narayanbhat166@users.noreply.github.com>
Co-authored-by: BallaNitesh <126162378+BallaNitesh@users.noreply.github.com>
This commit is contained in:
Kartikeya Hegde
2023-09-11 13:21:08 +05:30
committed by GitHub
parent 73da641b58
commit 25e82a1f7f
6 changed files with 40 additions and 78 deletions

View File

@ -29,7 +29,7 @@ pub async fn lookup_webhook_event(
Ok(merchant_webhook_config) => merchant_webhook_config.contains(event),
Err(..) => {
//if failed to fetch from redis. fetch from db and populate redis
db.find_config_by_key_cached(&redis_key)
db.find_config_by_key(&redis_key)
.await
.map(|config| {
if let Ok(set) =