Include extra arguments in cache calculation.

Closes #13.