When to worry about cacheing?

  1. Custom cacheing
  2. Cacheing
  3. Watching your cache

Generally, you don’t want to go overboard when cacheing. Cacheing adds complexity, and you often don’t know where it’s needed. When you’ve finished adding a feature, you can test how long it takes using the {% now %} tag in your code and by calculating elapsed time inside of your Python code.

from datetime import datetime

start = datetime.now()

elapsed = datetime.now() - start

print "Time spent calculating swallow speed: ", elapsed

  1. Custom cacheing
  2. Cacheing
  3. Watching your cache