Skip to content

Create cache directory if it does not exist #18

@gruhn

Description

@gruhn

When the configured cache directory does not exist PHP will throw an error. I guess because file_put_contents relies on the file path to exist.

Sure it's not a big deal to create the directory manually. I assume most folks don't want to track the cache files in version control though so they are likely to list the cache directory in .gitignore. Since you can't really track the directory itself while excluding all files within, you have to create the cache directory every time you pull a fresh copy of the project.

Although there are workarounds I think it's slightly more convenient to create the directory when it does not exist. Unless of course there is a specific disadvantage I can't think of right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions