node-shared-cache
node-shared-cache copied to clipboard
Error: length of property name should not be greater than 256 [CentOS 7 x64 & Win 10 x64]
On both linux and windows 64-bit systems I received the following message when trying:
WIN10 x64:
const binding = require('node-shared-cache') undefined obj = new binding.Cache("test", 512 * 1024); Error: length of property name should not be greater than 256 at formatValue (util.js:423:37) at Object.inspect (util.js:324:10) at REPLServer.self.writer (repl.js:365:19) at finish (repl.js:486:38) at REPLServer.defaultEval (repl.js:279:5) at bound (domain.js:301:14) at REPLServer.runBound [as eval] (domain.js:314:12) at REPLServer.onLine (repl.js:442:10) at emitOne (events.js:121:20) at REPLServer.emit (events.js:211:7)
CentOS 7 x64:
const binding = require('node-shared-cache') obj = new binding.Cache("test", 512 * 1024); Error: length of property name should not be greater than 256 at formatValue (util.js:423:37) at Object.inspect (util.js:324:10) at REPLServer.self.writer (repl.js:365:19) at finish (repl.js:486:38) at REPLServer.defaultEval (repl.js:279:5) at bound (domain.js:301:14) at REPLServer.runBound [as eval] (domain.js:314:12) at REPLServer.onLine (repl.js:442:10) at emitOne (events.js:121:20) at REPLServer.emit (events.js:211:7)
Please let me know if it is a bug or I am doing something wrong?
However if I just igoner errors and try to set 'obj' property to some value it succeeds:
> obj.foo = 1
1
> obj.foo
1
But obj.set property is undefined:
> obj.set
undefined
> binding.set
undefined
NodeJS version: v 8.9.3
It's mentioned in the docs:
"key length should also not be greater than 256"
https://github.com/kyriosli/node-shared-cache#constructor