1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-27 09:12:57 +01:00

Merge pull request #33 from Dowwie/master

updated version of crate, CHANGES.md, documented cache_keygen method,…
This commit is contained in:
Darin 2019-09-25 09:26:13 -04:00 committed by GitHub
commit 505254f7cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,11 @@
# Changes
## 0.7 (2019-09-25)
* added cache_keygen functionality to RedisSession builder, enabling support for
customizable cache key creation
## 0.6.1 (2019-07-19)
* remove ClonableService usage

View File

@ -1,6 +1,6 @@
[package]
name = "actix-redis"
version = "0.6.1"
version = "0.7.0"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Redis integration for actix framework"
license = "MIT/Apache-2.0"

View File

@ -88,6 +88,7 @@ impl RedisSession {
self
}
/// Set a custom cache key generation strategy, expecting session key as input
pub fn cache_keygen(mut self, keygen: Box<dyn Fn(&str) -> String>) -> Self {
Rc::get_mut(&mut self.0).unwrap().cache_keygen = keygen;
self