-
Notifications
You must be signed in to change notification settings - Fork 79
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
Clear db cache on startup #102
base: master
Are you sure you want to change the base?
Conversation
@zaidka What about this one? ;-) |
Won't this cause cache to clear whenever a new worker process starts? |
I'm not sure. I verified the execution of the |
I had a look at this once more. The There's another possible place to clear the cache on startup, in
But I don't have access to the Rails or the GenieacsGUI object there AFAIK. @zaidka Do you have an idea how to fix this? |
Maybe clear the cache manually from console or using a rake command. |
Well, then I'd rather have the disadvantage of getting the cache cleared too often than having to run a command manually 😁 |
Why not cache in memory instead? |
You mean using MemoryStore as the cache store? (https://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-memorystore) Well, that's an option too, but then there's a cache per worker as I have understood it. Should we go this way? |
Clear the cache for the users/roles/permissions datastructures on app startup. This ensures that the cache is always up to date, for example if a database import has been done before running the app.