Hi,
My requirement is to retrieve data from cache and populate an array in NodeJS...I have used apigee-access module to create and populate the cache.
But for some reason my array is empty when printed outside the callback
Code Snippet
var cacheResp = []; cache.get(cacheKey,function(err, data) { cacheResp.push(data); console.log("**** Cache 1: **** " + cacheResp); }); console.log("**** Cache 2: **** " + cacheResp);