-
Notifications
You must be signed in to change notification settings - Fork 12
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
File dependency caching #16
Comments
Just set |
@francislavoie okay to close this? |
Sorry I never answered, I still think this is needed. There needs to be a good way to invalidate the cache. You said you were thinking about rebuilding the cache module, so I think it's worth keeping this issue open until you get to that. I was thinking about writing a PR for this, but right now there's no obvious way to get a list of the files loaded from the cache module. It would need a bit of a rewrite to make that information available, and that's more work than I have time to commit. Your suggestion for development is fine, but I don't just want this for development, I want it for production too so I don't have to wipe the cache (delete the vars folder) or wait 5 minutes. I also use a long-running job queue service, and if the config is changed I need to reboot those as well (they only read config once at the start) and if the old config is cached and I reboot them, then they'll still have the old config. So I always have to wipe the cache myself every time I make a change. For now, I'm going to write a manual check ahead of where I load Thanks! |
I do like that this lib automatically handles caching, but it's pretty annoying to have to clear the cache every time I want to test changes to my configs. It would be beneficial if this lib checked the last modified time of the files it loads before loading from cache as an option. That can be done using
filemtime
on the file(s) loaded. For my case, I only have one file to load, so this would be cheap.Thanks
The text was updated successfully, but these errors were encountered: