invalidate middleware cache on POST/PUT/DELETE