Skip to content

Commit

Permalink
Merge pull request #24 from Financial-Times/revert-23-distinct-uuid-c…
Browse files Browse the repository at this point in the history
…ache

Revert "Distinct uuid cache for uuid and products requests"
  • Loading branch information
ironsidevsquincy authored Feb 15, 2017
2 parents 7afb80e + df15d6c commit f3099c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function uuid(){

function products(){
const cachedProducts = cache('products');
const cachedUUID = cache('uuid-products');
const cachedUUID = cache('uuid');

if(cachedProducts && cachedUUID){
return Promise.resolve({products:cachedProducts, uuid:cachedUUID});
Expand All @@ -32,7 +32,7 @@ function products(){
if(!promises.products){
promises.products = request('/products').then(function(response){
cache('products', response.products);
cache('uuid-products', response.uuid);
cache('uuid', response.uuid);
return response;
});
}
Expand Down

0 comments on commit f3099c6

Please sign in to comment.