updated query caching and transaction in Rails
some more