Key the cache of Transforms using the trajectory.

Fix #303.
why not `{trajectory, t}`?