Add another variant of getCacheDir() function.