subranges: detach cache logic from computation logic
Having both the logic around cache checking and setting makes is a bit harder to
follow. In addition, this allow to gather the computation logic next to the
other related function.
syntax: re
/figures/[^/]+\.png$
^html/
\.pyc$
~$
\.swp$
\.orig$
\.rej$
\.err$
^tests/easy_run.sh$
^build/
^dist/
^MANIFEST$
^docs/tutorials/.*\.rst$
\.ico$
tests/\.testtimes