         tag = querystring.unescape(r[2])
         if request.method == 'POST'
           db.devicesCollection.update({'_id' : deviceId}, {'$addToSet' : {'_tags' : tag}}, {safe: true}, (err) ->
+            db.memcached.del("#{deviceId}_presets_hash", (err, res) ->
+            )
             if err
               response.writeHead(500)
               response.end(err)

          )
        else if request.method == 'DELETE'
          db.presetsCollection.remove({'_id' : presetName}, (err, removedCount) ->
            db.memcached.del('presets_hash', (err, res) ->
            )
            if err

          )
        else if request.method == 'DELETE'
          db.devicesCollection.update({'_id' : deviceId}, {'$pull' : {'_tags' : tag}}, {safe: true}, (err) ->
            db.memcached.del("#{deviceId}_presets_hash", (err, res) ->
            )
            if err
              response.writeHead(500)
              response.end(err)
