Added cache directory creation