The Dark Knight Rises is set 8 years after the day Harvey Dent was killed.
Why did it take so long for Bane to plot an attack against Batman?
I guess I'll just copy paste Oliver C.'s answer.
Christopher Nolan's answer to the 8 year gap is:
It's partly about a physical and emotional toll and it's partly about being true to the end of [The Dark Knight].
What you have at the end of 'The Dark Knight' is an ending that hangs very much on substantial sacrifice to achieve a certain end and for that to have meaning, it has to work in some sense, it has to have been successful. And I didn't want to just abandon that and pick up a new story with a whole new set of ideas.
So for me, that lead to the 8 year gap, it lead to the idea of Bruce Wayne, shut away in self-imposed exile because he's hung up his cape and cowl. He's living in a world, at least superficially, that doesn't need Batman but he hasn't moved on, he hasn't moved on as Alfred points out, he hasn't moved on emotionally or in a practical sense.
He reiterates this in another interview:
... I think what we're saying is that for Batman and Commissioner Gordon, there's a big sacrifice, a big compromise, at the end of the 'The Dark Knight', and for that to mean something, that sacrifice has to work, and Gotham has to get better in a sense. They have to achieve something for the ending of that film—and the feeling at the end of that film—to have validity.
Their sacrifice has to have meaning, and it takes time to establish that and to show that, and that's the primary reason we did that.
It's a time period that is not so far ahead that we would have to do crazy makeup or anything—which I think would be distracting...
The last sentence sounds like he had thought about an even bigger gap, but decided against it because he wanted to avoid 'old people make-up'.