Re: Caching of /public files
Sorry, I should have specified, the files stored in /public on rails for instance. These aren't managed by a controller (so no headers that way) and I was wondering if heroku had a default approach to them. It occurs to me that this may be entirely a Rack issue, though hopefully somebody here can point me in the right direction. On Sep 22, 4:01 am, Jeff Deville jeffdevi...@gmail.com wrote: This what you're looking for?http://docs.heroku.com/http-caching On Tue, Sep 21, 2010 at 10:36 PM, Alex a...@heaton.me wrote: I'm wondering about the options for caching of public files, I would image they are cached by default? How do you set caching headers on them for instance? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Caching of /public files
Does Heroku not apply these headers for you? Looking at my site I see Cache-Control:public, max-age=43200 added to any images served from public? I was surprised to learn that ActionDispatch::Static/Rails doesn't cache the static files in production but I guess it does make sense. You could always add a caching middleware if you really need to? You can also pass Cache-Control headers into Rack::Static too but I'm not sure how you would tell Rails to do that? Steve On 22 Sep 2010, at 11:39, Alex wrote: Sorry, I should have specified, the files stored in /public on rails for instance. These aren't managed by a controller (so no headers that way) and I was wondering if heroku had a default approach to them. It occurs to me that this may be entirely a Rack issue, though hopefully somebody here can point me in the right direction. On Sep 22, 4:01 am, Jeff Deville jeffdevi...@gmail.com wrote: This what you're looking for?http://docs.heroku.com/http-caching On Tue, Sep 21, 2010 at 10:36 PM, Alex a...@heaton.me wrote: I'm wondering about the options for caching of public files, I would image they are cached by default? How do you set caching headers on them for instance? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Caching of /public files
I agree with Steve, 1) Static assets served from public are cached for 12 hours. ( http://docs.heroku.com/http-caching under Static Assets) 2) Setting up your own Rack::Static has a bug in it that is not setting the cache headers, and it is not possible to override. I thought the Heroku team was either fixing it or had fixed it recently. --Keenan On Sep 22, 2010, at 7:09 AM, Steve Smith wrote: Does Heroku not apply these headers for you? Looking at my site I see Cache-Control:public, max-age=43200 added to any images served from public? I was surprised to learn that ActionDispatch::Static/Rails doesn't cache the static files in production but I guess it does make sense. You could always add a caching middleware if you really need to? You can also pass Cache-Control headers into Rack::Static too but I'm not sure how you would tell Rails to do that? Steve On 22 Sep 2010, at 11:39, Alex wrote: Sorry, I should have specified, the files stored in /public on rails for instance. These aren't managed by a controller (so no headers that way) and I was wondering if heroku had a default approach to them. It occurs to me that this may be entirely a Rack issue, though hopefully somebody here can point me in the right direction. On Sep 22, 4:01 am, Jeff Deville jeffdevi...@gmail.com wrote: This what you're looking for?http://docs.heroku.com/http-caching On Tue, Sep 21, 2010 at 10:36 PM, Alex a...@heaton.me wrote: I'm wondering about the options for caching of public files, I would image they are cached by default? How do you set caching headers on them for instance? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Caching of /public files
Heroku by default caches all static assets in /public for 24 hours. Oren On Wed, Sep 22, 2010 at 3:39 AM, Alex a...@heaton.me wrote: Sorry, I should have specified, the files stored in /public on rails for instance. These aren't managed by a controller (so no headers that way) and I was wondering if heroku had a default approach to them. It occurs to me that this may be entirely a Rack issue, though hopefully somebody here can point me in the right direction. On Sep 22, 4:01 am, Jeff Deville jeffdevi...@gmail.com wrote: This what you're looking for?http://docs.heroku.com/http-caching On Tue, Sep 21, 2010 at 10:36 PM, Alex a...@heaton.me wrote: I'm wondering about the options for caching of public files, I would image they are cached by default? How do you set caching headers on them for instance? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Heroku Mongoid config and how it works
I just used a template for a new rails app that sets up everything for use with Mongoid. The mongoid.yml file looks like this: production: host: %= ENV['MONGOID_HOST'] % port: %= ENV['MONGOID_PORT'] % username: %= ENV['MONGOID_USERNAME'] % password: %= ENV['MONGOID_PASSWORD'] % database: %= ENV['MONGOID_DATABASE'] % I added the MONGOHQ_URL config var to my app (with the string given from mongohq), deployed and it worked! My question is...HOW? I don't get how adding that single URL has all of a sudden given me these 5 environment variables. I searched through the heroku docs on mongo and they pretty sparse. Nowhere does it mention that I might use these particular env vars. So how does this happen? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Caching of /public files
I could have sworn it was 24. But the documentation said 12... http://docs.heroku.com/http-caching What is the best channel to request an update to the docs? --Keenan On Sep 22, 2010, at 3:08 PM, Oren Teich o...@heroku.com wrote: Heroku by default caches all static assets in /public for 24 hours. Oren On Wed, Sep 22, 2010 at 3:39 AM, Alex a...@heaton.me wrote: Sorry, I should have specified, the files stored in /public on rails for instance. These aren't managed by a controller (so no headers that way) and I was wondering if heroku had a default approach to them. It occurs to me that this may be entirely a Rack issue, though hopefully somebody here can point me in the right direction. On Sep 22, 4:01 am, Jeff Deville jeffdevi...@gmail.com wrote: This what you're looking for?http://docs.heroku.com/http-caching On Tue, Sep 21, 2010 at 10:36 PM, Alex a...@heaton.me wrote: I'm wondering about the options for caching of public files, I would image they are cached by default? How do you set caching headers on them for instance? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
Re: Caching of /public files
The docs are right - I was wrong. We cache for 12 hours. Oren On Wed, Sep 22, 2010 at 5:17 PM, Keenan Brock kee...@thebrocks.net wrote: I could have sworn it was 24. But the documentation said 12... http://docs.heroku.com/http-caching What is the best channel to request an update to the docs? --Keenan On Sep 22, 2010, at 3:08 PM, Oren Teich o...@heroku.com wrote: Heroku by default caches all static assets in /public for 24 hours. Oren On Wed, Sep 22, 2010 at 3:39 AM, Alex a...@heaton.me wrote: Sorry, I should have specified, the files stored in /public on rails for instance. These aren't managed by a controller (so no headers that way) and I was wondering if heroku had a default approach to them. It occurs to me that this may be entirely a Rack issue, though hopefully somebody here can point me in the right direction. On Sep 22, 4:01 am, Jeff Deville jeffdevi...@gmail.com wrote: This what you're looking for?http://docs.heroku.com/http-caching On Tue, Sep 21, 2010 at 10:36 PM, Alex a...@heaton.me wrote: I'm wondering about the options for caching of public files, I would image they are cached by default? How do you set caching headers on them for instance? -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.comheroku%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en. -- You received this message because you are subscribed to the Google Groups Heroku group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.