I'm using the instructions in this github readme file (at the bottom) to make ajax calls for autocompleting a list of tags, sort of like what this website does, actually!
It works pretty well, but it seems like it might be a little inefficient, since the list of tags almost never changes. Does anyone have recommendations on how to make this better? Like, if I could store a copy of the list of tags in memory somewhere, and just query that copy instead of querying the db?
@tags = Tag.restrict_taggable_type("Document").find(:all, :conditions => ["name LIKE ?", "%#{params[:tag]}%"])
Thanks...