 
 			it "set", () ->
 				for key in state.keys
-					localCache.set key, state.val, (err, res) ->
-						should.not.exist err
-						true.should.eql res
-						return
+					res = localCache.set key, state.val
+					true.should.eql res
 				return
 
 			it "get", () ->
-				localCache.get state.keys[0], (err, res) ->
-					should.not.exist err
-					state.val.should.eql res
-					return
+				res = localCache.get state.keys[0]
+				state.val.should.eql res
 				return
 
 			it "mget", () ->
-				localCache.mget state.keys[0..1], (err, res) ->
-					should.not.exist err
-					# generate prediction
-					prediction = {}
-					prediction[state.keys[0]] = state.val
-					prediction[state.keys[1]] = state.val
-					prediction.should.eql res
-					return
+				res = localCache.mget state.keys[0..1]
+				# generate prediction
+				prediction = {}
+				prediction[state.keys[0]] = state.val
+				prediction[state.keys[1]] = state.val
+				prediction.should.eql res
 				return
 
 			it "del single", () ->
-				localCache.del state.keys[0], (err, count) ->
-					should.not.exist err
-					1.should.eql count
-					return
+				count = localCache.del state.keys[0]
+				1.should.eql count
 				return
 
 			it "del multi", () ->
-				localCache.del state.keys[1..2], (err, count) ->
-					should.not.exist err
-					2.should.eql count
-					return
+				count = localCache.del state.keys[1..2]
+				2.should.eql count
 				return
 
 			it "ttl", (done) ->

	checkperiod: 0
})


localCacheTTL = new nodeCache({
	stdTTL: 0.3,


		return

	describe "max key amount", () ->
		before () ->
			state =
				key1: randomString(10)
				key2: randomString(10)
				key3: randomString(10)
				value1: randomString(10)
				value2: randomString(10)
				value3: randomString(10)
			return

		it "exceed max key size", () ->
			setKey = localCacheMaxKeys.set(state.key1, state.value1, 0)
			true.should.eql setKey

			setKey2 = localCacheMaxKeys.set(state.key2, state.value2, 0)
			true.should.eql setKey2

			(() -> localCacheMaxKeys.set(state.key3, state.value3, 0)).should.throw({
				name: "ECACHEFULL"
				message: "Cache max key size exceeded"
			})
			return

		it "remove a key and set another one", () ->
			del = localCacheMaxKeys.del(state.key1)
			1.should.eql del

			setKey3 = localCacheMaxKeys.set(state.key3, state.value3, 0)
			true.should.eql setKey3
			return

		return

	describe "correct and incorrect key types", () ->
		describe "number", () ->
			before () ->
