Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Caching something through cron, is not accessible in the web application #4751

Closed
pixobit opened this issue May 28, 2021 · 1 comment
Closed
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@pixobit
Copy link
Contributor

pixobit commented May 28, 2021

Describe the bug
If I use cache()->save('products-facet', $data, 0); in a cron job (which is a cli route), the web application won't be able to access this cache, it will throw "Permission Denied"

CodeIgniter 4 version
4.1.2

Expected behavior, and steps to reproduce if appropriate
Not sure what's the correct way to tackle this, but what I did as a workaround for now, is that I changed the chmod after caching from 0640 to 0644

Note: The purpose of this cron is to index some data, that's why I'm using the caching

@pixobit pixobit added the bug Verified issues on the current code behavior or pull requests that will fix them label May 28, 2021
@MGatner
Copy link
Member

MGatner commented May 29, 2021

This was addressed recently. Upgrade your framework and then set file.mode in app/Config/Cache.php.

@MGatner MGatner closed this as completed May 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

2 participants