Add Redis getter

This commit is contained in:
Jake 2014-11-02 10:47:40 -06:00
parent 326e733d43
commit 5a4643f334
2 changed files with 6 additions and 2 deletions

View File

@ -25,6 +25,10 @@ function connect_redis() {
var exp = {};
exp.get_redis = function() {
return redis;
};
// sets the timestamp for +uuid+ to now
exp.update_timestamp = function(uuid) {
console.log(uuid + " cache: updating timestamp");

View File

@ -5,7 +5,7 @@ var networking = require('../modules/networking');
var helpers = require('../modules/helpers');
var config = require('../modules/config');
var skins = require('../modules/skins');
var redis = require("../modules/cache");
var cache = require("../modules/cache");
var uuids = fs.readFileSync('test/uuids.txt').toString().split("\r\n");
// Get a random UUID in order to prevent rate limiting
@ -13,7 +13,7 @@ var uuid = uuids[Math.floor(Math.random() * uuids.length)];
describe('Avatar Serving', function(){
before(function() {
redis.flushall();
cache.get_redis().flushall();
});
describe('UUID', function(){
it("should be an invalid uuid", function(done){