Re: HTTP Caching / Rails / etag / last modifed / varnish

2010-05-28 Thread Thomas Balthazar
Hello,

I still have problems with Varnish and caching.
(read this thread from the beginning, it has a lot of
explanations/code samples/screencasts)

Here is my code :
http://gist.github.com/417697

On my dev machine, the first time I hit 'index', I can see the log
messages and the posts are fetched.
The second time I hit 'index', I receive a 304 response and posts are
not fetched (nor log messages are displayed)

When testing it on Heroku, the posts are always fetched and logs
messages always displayed.
(It should behave as it does locally)

Am I missing something?

Thanks in advance for your help.
Thomas.

On Thu, Sep 10, 2009 at 12:46 PM, Thomas Balthazar
 wrote:
> Hello Ryan,
>
> Did you find the time to test it?
>
> Best,
> Thomas.
>
>
>
> On Thu, Aug 27, 2009 at 5:33 PM, Ryan Tomayko  wrote:
>>
>> On Thu, Aug 27, 2009 at 2:07 AM, Thomas Balthazar 
>> wrote:
>>> Hello Ryan,
>>>
>>> Thanks a lot for your in-depth explanation.
>>>
>>> If I understand you correctly, if I specify :
>>>   response.headers['Cache-Control'] = "public, must-revalidate"
>>> or
>>>   expires_in 0, :public => true
>>>
>>> then the backend will be asked if the content is still fresh for every
>>> request, but the backend will only generate a new response if the etag
>>> has changed (if the etag hasn't changed, a 304 not-modified header
>>> will be sent and the content will be served from the cache, as in the
>>> last drawing in your article :
>>> http://tomayko.com/writings/things-caches-do )
>>>
>>> I tried both solutions, and here are my results :
>>>
>>> * expires_in 0 :
>>>  - with Safari, the page doesn't seem to be served from the cache
>>>  - with Firefox, the page is served from the cache and correctly
>>> expired when I create a new item, it is working as expected
>>>
>>> * response.headers['Cache-Control'] = "must-revalidate"
>>>  - with Safari and Firefox : the page is cached but not expired when I
>>> create a new item
>>>
>>> Again, a 15.2Mb screencast that shows it in details :
>>> http://dl.getdropbox.com/u/40466/tmp/heroku-caching-2.mov
>>
>> Interesting. I'll dig in and take a look at this today.
>>
>> Thanks,
>> Ryan
>>
>> --~--~-~--~~~---~--~~
>> You received this message because you are subscribed to the Google Groups 
>> "Heroku" group.
>> To post to this group, send email to heroku@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.



Web Stats

2010-05-28 Thread DAZ
Hi,

Is it possible to get basic web stats such as page hits about sites
that are hosted on Heroku? If not, is the easiest way to use Google
Analytics or something similar?

cheers,

DAZ

-- 
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.