         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)

        if request.method == 'POST'
          deviceId = querystring.unescape(DEVICE_TASKS_REGEX.exec(urlParts.pathname)[1])
          if body
            t = JSON.parse(body)
            t.device = deviceId
            apiFunctions.insertTasks(t, (err) ->
              if err
                response.writeHead(500)
                response.end(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)
