Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
Use DataRequest name function.
Browse files Browse the repository at this point in the history
  • Loading branch information
BSMaidSafe committed Sep 3, 2015
1 parent 41af0d9 commit bdd5734
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/routing_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,8 @@ impl RoutingNode {
if self.cache_options.plain_data_caching_enabled() {
match data_cache.get(&data_name) {
Some(data) => {
debug!("Got PlainData {:?} from cache", data_name);
debug!("Got PlainData {:?} from cache",
data_name);
let response =
ExternalResponse::Get(
data.clone(),
Expand All @@ -1236,10 +1237,10 @@ impl RoutingNode {
}
DataRequest::StructuredData(data_name, tag) => {
if self.cache_options.structured_data_caching_enabled() {
let name = StructuredData::compute_name(tag, &data_name);
match data_cache.get(&name) {
match data_cache.get(&data_request.name()) {
Some(data) => {
debug!("Got StructuredData {:?} from cache", name);
debug!("Got StructuredData {:?} from cache",
data_request.name());
let response =
ExternalResponse::Get(
data.clone(),
Expand All @@ -1256,7 +1257,8 @@ impl RoutingNode {
if self.cache_options.immutable_data_caching_enabled() {
match data_cache.get(&data_name) {
Some(data) => {
debug!("Got ImmutableData {:?} from cache", data_name);
debug!("Got ImmutableData {:?} from cache",
data_name);
let response =
ExternalResponse::Get(
data.clone(),
Expand Down

0 comments on commit bdd5734

Please sign in to comment.