Rate-limiting middleware backed by memcache counters per discrete time window