ptarjan / node-cache

A simple in-memory cache for nodejs
BSD 2-Clause "Simplified" License
1.59k stars 214 forks source link

weird error since last update #51

Closed japel closed 9 years ago

japel commented 9 years ago

hey there! I was using version 0.1.2 and everything was working fine. As I updated today to version 0.1.3 I cannot longer retrieve stored key value pairs.

This is what worked on 0.1.2 and is not working in 0.1.3 anymore:

//myAwesomeJSFile1.js
var myAwesomeCache = require("memory-cache");
myAwesomeCache.put("myKey","myValue");

//myAwesomeJSFile2.js
var myAwesomeCache = require("memory-cache");
console.log(myAwesomeCache.get("myKey")); 
//prints "myValue" in 0.1.2
//prints null in 0.1.3

does it maybe have something to do with the added parameter validation?

Best regards!

jwngr commented 9 years ago

Yup, this was my fault caused by #48. PR with a fix is incoming.