Update d2d-memcache to 0.6.
This commit is contained in:
parent
20da5fab92
commit
86cdb70d45
@ -21,7 +21,7 @@ kamadak-exif = "0.5.0"
|
||||
libc = "0.2.68"
|
||||
log = "0.4.8"
|
||||
mime = "0.3.0"
|
||||
r2d2-memcache = "0.5.0"
|
||||
r2d2-memcache = "0.6"
|
||||
rand = "0.7.0"
|
||||
regex = "1.3.6"
|
||||
reqwest = { version = "0.10.4", features = ["json"] }
|
||||
|
@ -34,7 +34,7 @@ impl Args {
|
||||
pub async fn run(&self) -> Result<(), Error> {
|
||||
let max_time = Duration::from_secs(self.max_time);
|
||||
let timer = Instant::now();
|
||||
let mut cache = Client::connect(self.cache.memcached_url.as_ref())?;
|
||||
let cache = Client::connect(self.cache.memcached_url.as_ref())?;
|
||||
let size = SizeTag::Small;
|
||||
let (mut n, mut n_stored) = (0, 0);
|
||||
let photos = Photo::query(true)
|
||||
|
@ -145,7 +145,7 @@ impl Context {
|
||||
R: Future<Output = Result<Vec<u8>, E>>,
|
||||
{
|
||||
match self.global.cache() {
|
||||
Ok(mut client) => {
|
||||
Ok(client) => {
|
||||
match client.get(key) {
|
||||
Ok(Some(data)) => {
|
||||
debug!("Cache: {} found", key);
|
||||
@ -172,7 +172,7 @@ impl Context {
|
||||
}
|
||||
}
|
||||
pub fn clear_cache(&self, key: &str) {
|
||||
if let Ok(mut client) = self.global.cache() {
|
||||
if let Ok(client) = self.global.cache() {
|
||||
match client.delete(key) {
|
||||
Ok(flag) => debug!("Cache: deleted {}: {:?}", key, flag),
|
||||
Err(e) => warn!("Cache: Failed to delete {}: {}", key, e),
|
||||
|
Loading…
Reference in New Issue
Block a user