R
R
Ruslan Galiev2015-12-21 11:51:57
Ruby on Rails
Ruslan Galiev, 2015-12-21 11:51:57

Rails Why is data uploaded with Rake tasks not updating?

Hello
Problem following: in application I use gem whenever for start of rake tasks by means of cron. Using a rake task, I'm updating objects in a MySQL database. Everything works, the data is updated in the database, but if the data on the web pages is not updated until I do some action, for example, I update one of the objects. It looks like the data is being cached. Please tell me how to turn it off. development environment, web server thin.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Dyachuk, 2015-12-24
@Renius

1. By default, in the development environment, data is not cached, google rails cache, there are keys to enable and disable caching.
2. If caching. You need to look at what means the caching object is being built, according to the custom key, under the date the object was changed, etc. etc. Look for the word cache in the code, nothing should happen without it
3. If caching, invalidate the code cache, update the rake data with a task.
edgeguides.rubyonrails.org/caching_with_rails.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question