1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-02-17 08:33:30 +01:00

updated version of crate, CHANGES.md, documented cache_keygen method, ready for release

This commit is contained in:
dowwie 2019-09-25 08:42:49 -04:00
parent 7f7962663d
commit 468118a8ee
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