alamin655 commited on
Commit
fc830c4
·
unverified ·
1 Parent(s): a2360d1

Update redis_cacher.rs

Browse files
Files changed (1) hide show
  1. src/cache/redis_cacher.rs +2 -2
src/cache/redis_cacher.rs CHANGED
@@ -3,7 +3,7 @@
3
 
4
  use error_stack::Report;
5
  use futures::future::try_join_all;
6
- use sha256::digest;
7
  use redis::{aio::ConnectionManager, AsyncCommands, Client, RedisError};
8
 
9
  use super::error::CacheError;
@@ -59,7 +59,7 @@ impl RedisCache {
59
  ///
60
  /// * `url` - It takes an url as string.
61
  fn hash_url(&self, url: &str) -> String {
62
- digest(url)
63
  }
64
 
65
  /// A function which fetches the cached json results as json string from the redis server.
 
3
 
4
  use error_stack::Report;
5
  use futures::future::try_join_all;
6
+ use blake3::hash;
7
  use redis::{aio::ConnectionManager, AsyncCommands, Client, RedisError};
8
 
9
  use super::error::CacheError;
 
59
  ///
60
  /// * `url` - It takes an url as string.
61
  fn hash_url(&self, url: &str) -> String {
62
+ format!("{:?}", blake3::hash(url.as_bytes()))
63
  }
64
 
65
  /// A function which fetches the cached json results as json string from the redis server.