Yes I did send that… Sorry if this is confusing.
What I’m specifically refering to here, is that if a select box, all
by itself is fragmet cached, then that select box is set, default
value and everything. (at least I think it is, that’s what I was
Form elements are not really good things to cache in my exp, because
you cannot easily update their values on the server side. (Excepting
Take this fragment
<%= text_field “user”, “name” %>
If this is cached, then on a new form, all well and good, but if that
form is submitted and returns errors, then the frag cache will blank
it out, ie return the original frag, a blank text field.
Likewise if just that field were cached and the same form partial were
used for an edit action, the field would be blank as well even if
normally it would have something in it.
Also, if the first time the frag is generated it contains data (the
edit action), then that data will become the default value until the
frag is expired and regenerated.
At least this is my understanding of how it works. That’s why in your
situation (other post) it’s good to tie it to a user. Each user will
have their own frag generated and stored seperately when a :user =>
@user.id is included in the cache call.
Things like slabs of non-form markup are good for cacheing. ie
<%= @user.name -%>
<%= @user.street -%>
<%= @user.city -%>
Could all be wrapped up in a frag cache quite nicley. As I said in my
other post, make sure to expire it if you change the data.
Also none of these effects will be noticed in development by default.
Caching is turned off in development.