Rails asset cache

I have a of line code like
<%= stylesheet_link_tag “styles”,:cache => “cache/styles” %>

And it produces source as
config.action_controller.perform_caching = true

My concern is what is 1279620123 after question mark(?) above. If such a
random number always appended, whether caching in browser happens or
not?Please give me a good idea

Thanks
Tom

On 23 July 2010 10:52, Tom M. [email protected] wrote:

My concern is what is 1279620123 after question mark(?) above. If such a
random number always appended, whether caching in browser happens or
not?Please give me a good idea

It’s the timestamp when the file was last changed (or the last file if
you
list multiple stylesheets in stylesheet_link_tag).

That way browsers can cache it long term and it will automatically
change if
you change one of the files during a new deployment.

Cheers,

Andy

Hi
Again I am facing a problem. I am using firefox with firebug.A
portion of my code like
<%= stylesheet_link_tag “styles”,“home”, :cache => “cache/all” %>

Now in my local machine from firebug under net tab I disabled “Browser
cache” .Then result I got like

GET home http://localhost:3000/home 200 OK localhost:3000 14.4 KB (?)

GET styles.css?1279620123
http://localhost:3000/stylesheets/styles.css?1279620123
200 OK …

Again from local machine I enabled “Browser cache” and got result
like(Only the below line I got)
GET home http://localhost:3000/home 304 Not Modified localhost:3000 14.4
KB …

But the above same procedure when I did from another machine which is
not local, I got the same result for both the steps. Caching did not
happen.

I got 200 OK for both steps. I am running in staging mode. Please 

help me to resolve this

Thanks
Tom

Sorry, no idea.

(just to let you know that you’re not being ignored it’s just likely
that
no-one has an answer for you, this generally works fine for me).


Andy J.
http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery
Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS
Company number: 5452840

I development mode, cache is disabled.

Hi
Could anybody please clarify my doubt?

Thanks

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs