invalidate cache when skin file is gone

This commit is contained in:
jomo 2015-04-22 00:31:37 +02:00
parent 3cdcccde57
commit c8dad9dfbb

View File

@ -53,6 +53,13 @@ module.exports = function(req, callback) {
try {
helpers.get_skin(rid, userId, function(err, hash, status, image) {
if (err) {
logging.error(req.id, err);
if (err.code === "ENOENT") {
// no such file
cache.remove_hash(req.id, userId);
}
}
if (image) {
callback({
status: status,