Skip to content
kitallis edited this page Sep 12, 2010 · 6 revisions

Removing the time caching

Time caching is what paperclip uses so the file is not cached. It looks like this when you ask for an image:
/path/to/file.jpg?1272933550

The ‘?1272933550’ on the end is the time caching.

I’ve found that sometimes you cannot use the caching such as when you are dealing with pdf_writer. Here is how to remove the time caching.

<%= image_tag @image.source.url(:large, false) %>
or
<img alt="Foo" src="<%= @user.photos.data.url.split("?")[0] %>" />