-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.7] Allow ENV to control paths of cache files for services, packages and routes #27389
[5.7] Allow ENV to control paths of cache files for services, packages and routes #27389
Conversation
Do you have an actual use case for this in your application? If so, can you please describe it. |
@taylorotwell, sure!
But I cannot override path for "bootstrap/cache/" natively. That's why I suggest to extend the ability to override all of paths which are using to write to fs. |
I don't know if this is the best implementation, but in terms of feature I think this is gonna become a must-have sooner or later with the rise of AWS Lambda and the fact that only |
@deleugpn this change isn't required to run Laravel (5.8 at least) on Lambda. Trust me... I would know 😉 |
@taylorotwell I remember going through all your commits on |
@taylorotwell Not missed it. Just think it’s a, “Wait until Laracon” deal. |
@martinbean I've been battling a lot with getting everything to work on Lambda and I feel like all my efforts are going to be thrown out the window after Vapor release. |
@divand @taylorotwell Why this folders not always / default write to the storage folder? |
Google sent me to this page when I was looking for this exact functionality. I am trying to configure Statamic without making changes to the code to avoid future upgrade hassles and so assumed this would be possible given how it is a best practice for 12 Factor apps. Since the question was "What's the use-case?" here is mine: My Statamic container is running in a VMware VM on my local network, and that container mounts the source directory from my laptop so I can work with the code there. I am writing a custom autoloader tool that needs access to source code so I am not actually modifying any of the Statamic or Laravel code, but I need to test my code actually running and being served by the VM. As my configuration is admittedly already really slow, having the cache served from my laptop there makes it even slower, which is why I want to move the cache to an SSD mounted locally on the VMware server. #justfyi #fwiw |
In order to override paths of all files in bootstrap/cache, add env vars below:
APP_SERVICES_CACHE
APP_PACKAGES_CACHE
APP_ROUTES_CACHE
env var "APP_CONFIG_CACHE" already defined in commit 578bc83#diff-7b18a52eceff5eb716c1de268e98d55d