Do not repeat dirname function execution in writing cache files
bug #1222 Do not repeat dirname function execution in writing cache files (glutamatt)

This PR was merged into the master branch.

Discussion
----------

Do not repeat dirname function execution in writing cache files

Commits
-------

a9870f4 Do not repeat dirname function execution in writing cache files