Skip to content

Commit

Permalink
Fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Ermilov committed Oct 5, 2020
1 parent c6751b6 commit 024dc5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ struct Ping { id: i32 }

impl Cacheable for Ping {
fn cache_key(&self) -> Result<String, CacheError> {
Ok(format!("Ping::{}", self.id))
Ok(format!("{}::{}", self.cache_key_prefix(), self.id))
}
fn cache_key_prefix(&self) -> String { "Ping".to_owned() }
}
```
Next step is to instantiate [Cache] actor with selected backend:
Expand Down

0 comments on commit 024dc5e

Please sign in to comment.