-
Notifications
You must be signed in to change notification settings - Fork 64
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
Changes in views in database are ignored in production until Rails is restarted #18
Comments
according to this spec, the cache is cleared when you update a view. Try to run tests locally to see if this still applies. On the Rails side, open your
Refer to the official guide for more details. Let me know how it evolves :-) |
@apeacox do you plan to add support for centralized caching? I am using this gem in an application that is load balanced so it's not useful to use the Rails cache because the change must be effected across multiple environments. To note, I did try just using redis as cache_store in application.rb but that didn't seem to work. |
@nhodges this looks something that needs some investigation. in theory, the mechanism used by panoramic is the same of the standard rails (except it reads from a db rather than from a filesystem). If you know a method to do centralized caching with plain rails views, perhaps we could find a solution for panoramic too. PRs are welcome :-) |
We have a similar setup to your gem with liquid in our SAAS project. We drop templates cache only in case if someone changed templates. |
I had this problem as well, with mailer templates not being updated in Delayed Job after they were changed in the database. For Delayed Job, the code below fixes the issue. Replace
If the issue occurs in because your environment runs multiple rails processes, you may try an initializer file containing |
@petercip how does turning off the resolver caching impact performance? |
@DanBrooker it has been negligible. If you're sending a massive volume of mail, it might be noticeable. |
Hi @petercip, are you still happy with caching turned off? What kind of traffic does this handle now? Or have you found a way to expire only the cache of a template when it's updated? Thanks! |
As I understand it, the issue is that
Does anyone have suggestions of how we could ensure that our memcached store is being used, or how we can use
Hoping someone has found a solution to be able to use panoramic in a multi-instance deployment. Thanks! |
So far my best solution is to override the Actionview::Resolver cached method in panoramic so that the cache will never be called. This doesn't feel like an ideal solution so I am curious to hear how others have handled it, and if anyone was able to work towards a solution for centralized caching of view templates. |
@Velora - can you share how you overrode the cache method? Have you found a better solution? |
@asecondwill sure. No, we have not found a better solution yet. We have an initializer that looks something like this:
|
@Velora thank you for your solution, it helped me with the same problem. |
It seems the view is cached when it is first read in production. Is this related to Rails or Panoramic? I would like to flush the cache when the view is updated.
The text was updated successfully, but these errors were encountered: