cache non-existing UUIDs, fixes #93

This commit is contained in:
jomo 2015-02-14 20:26:09 +01:00
parent 7ca7006736
commit 3fdd942c0f

View File

@ -146,7 +146,15 @@ function store_images(rid, userId, details, type, callback) {
currently_running.push(new_hash); currently_running.push(new_hash);
networking.get_profile(rid, (is_uuid ? userId : null), function(err, profile) { networking.get_profile(rid, (is_uuid ? userId : null), function(err, profile) {
if (err || (is_uuid && !profile)) { if (err || (is_uuid && !profile)) {
if (!err && !profile) {
cache.save_hash(rid, userId, null, null, function(cache_err) {
// we have no profile, so we have neither skin nor cape
callback_for(userId, "skin", cache_err, null);
callback_for(userId, "cape", cache_err, null);
});
} else {
callback_for(userId, type, err, null); callback_for(userId, type, err, null);
}
} else { } else {
store_skin(rid, userId, profile, details, function(err, skin_hash) { store_skin(rid, userId, profile, details, function(err, skin_hash) {
cache.save_hash(rid, userId, skin_hash, null, function(cache_err) { cache.save_hash(rid, userId, skin_hash, null, function(cache_err) {