Skip to content

Commit

Permalink
Switched to new naming conventions
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
olliwer authored and rafaelfranca committed Apr 11, 2013
1 parent 53d6cc0 commit dab8233
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions activerecord/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Rails 4.0.0 (unreleased) ##

* Added Statement Cache to allow the caching of a single statement. The cache works by
duping the relation returned from yielding a statement which allows skipping the AST
building phase.
duping the relation returned from yielding a statement, which allows skipping the AST
building phase for following executes. The cache returns results in array format.

Example:

cache = ActiveRecord::StatementCache.new do
Book.where(:name => "my book").limit(100)
Book.where(name: "my book").limit(100)
end

books = cache.execute
Expand Down
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/statement_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module ActiveRecord
# Initializing the cache is done by passing the statement in the initialization block:
#
# cache = ActiveRecord::StatementCache.new do
# Book.where(:name => "my book").limit(100)
# Book.where(name: "my book").limit(100)
# end
#
# The cached statement is executed by using the +execute+ method:
Expand Down

0 comments on commit dab8233

Please sign in to comment.