testCacheUsage.js 372 B

12345678910111213
  1. /**
  2. * Created by Tony on 2017/3/20.
  3. */
  4. var test = require('tape');
  5. var cache = require('../../../public/cache/cacheUtil');
  6. test('test cache usage:', function(t) {
  7. cache.setCache("unit_Test_Grp","unit_TestKey","hello my cache!");
  8. var msg = cache.getCache("unit_Test_Grp","unit_TestKey");
  9. console.log(msg);
  10. t.equal(msg, "hello my cache!")
  11. t.end();
  12. })