will_paginate with conditions

Hi, I've just switched to will_paginate, which is impressive and easy to
use!

I have a question regarding conditions:

I build a query using values from the params that were entered onto a
web form using something like

:conditions => [" foo like x and bar like y", params[:x]+"%",
params[:y]+"%"]

It would appear that the conditions need to be respecified on each page
so I have had to remember them in the session:

unless params[:page]
      session[:search] = ["category_id = ? and foo like ?
                     and bar like ?",
          params[:item][:category_id],
          params[:item][:foo]+"%",
          params[:item][:bar]+"%"]
    end
    @items = Item.paginate :page => params[:page],
                           :conditions => session[:search]

This works, but have I got it right, or is there a better way?