Spaces:
Running
Running
alamin655
commited on
Update redis_cacher.rs
Browse files
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
|
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 |
-
|
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.
|