Keep a copy of the report

Lesson 2 of 3 · One request, end to end · 5 min Get the course to watch

Last time ended on a question. You click Generate report again, a minute after the first time. Does the database count all one hundred and eighty-six October rentals again?

Right now, it does. The same request makes the same trip, and the database finds the same rows and does the sums again. Same count, same total. Only the time has moved on, to nine fifteen and seven seconds.

But October is over. Those rows won't change, so the answer can't change either. Every click asks the database to redo work it has already done.

The rest of this lesson

  • Keep a copy
  • The second click
  • The key
  • A stale copy
  • Let it expire
  • Delete the copy
  • Which copies

The full lesson is animated and narrated, with a short quiz, and you can pause it to ask a question. It comes with Software System Design.