Conditional Action Caching?

I have a system that requires login. This is for administrative
purposes, so the pages will be the same as the public ones, except they
will have the edit|delete|new options.

Right now, I have:

caches_action :index

which works great, but I’d like:

caches_action :index unless user?

where user?() is defined in application.rb.

I get an exception using this construct. Can anyone help?

Thanks,

Steve