config.public_file_server.enabled configures Rails to serve static files from the public directory. This option defaults to true, but in the production environment it is set to false because the server software (e.g. NGINX or Apache) used to run the application should serve static files instead. If you are running or testing your app in production mode using WEBrick (it is not recommended to use WEBrick in production) set the option to true. Otherwise, you won't be able to use page caching and request for files that exist under the public directory.
The gem will now create cached files directly into the public folder, since we have the show route of diary_entries below /reports/, all cached files should end up in public/reports. We now delete every minute (that is the highest possible frequency with cron) this particular folder.
close #621
To give a little context here: Our app already servers static files, which is discouraged by the way.
The gem will now create cached files directly into the
public
folder, since we have theshow
route ofdiary_entries
below/reports/
, all cached files should end up inpublic/reports
. We now delete every minute (that is the highest possible frequency withcron
) this particular folder.