Moved cache middleware up stack