K
K
kolobrod212017-08-19 14:04:23
Ruby on Rails
kolobrod21, 2017-08-19 14:04:23

How to make Rails launch the main page without user interaction?

It is necessary to implement the launch of the main page of the application every hour without the participation of the visitor (automatically). To create a cached version. With the help of the whenever gem, is this possible (it was only possible to delete the file on schedule)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Karim Kyatlottyavi, 2017-08-21
@constXife

Speaking in the context of whenever, then you can do something like this.

every 1.hours do
  command "curl http://site.com"
end

R
Roman Mirilaczvili, 2017-09-04
@2ord

Cached results should be updated for all users, not deleted by checking against the last update time of each one individually. Periodically, say, once a minute, update the results in Memcached / Redis.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question