mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
feat(router): add route to invalidate cache entry (#1100)
Co-authored-by: jeeva <jeeva.ramu@codurance.com> Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
@ -96,11 +96,14 @@ pub async fn make_stream_available(
|
||||
stream_name_flag: &str,
|
||||
redis: &redis::RedisConnectionPool,
|
||||
) -> errors::DrainerResult<()> {
|
||||
redis
|
||||
.delete_key(stream_name_flag)
|
||||
.await
|
||||
.map_err(DrainerError::from)
|
||||
.into_report()
|
||||
match redis.delete_key(stream_name_flag).await {
|
||||
Ok(redis::DelReply::KeyDeleted) => Ok(()),
|
||||
Ok(redis::DelReply::KeyNotDeleted) => {
|
||||
logger::error!("Tried to unlock a stream which is already unlocked");
|
||||
Ok(())
|
||||
}
|
||||
Err(error) => Err(DrainerError::from(error).into()),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_stream_entries<'a>(
|
||||
|
||||
Reference in New Issue
Block a user