* has_and_belongs_to_many association support
* Fix memory leak issue in cached_associations
* DRYed-up belongs_to definition
* Make sure of use Memcached as test store. Compatibility changes for ActiveRecord 2.2.0
* Make sure of require frameworks configured in environment.rb
*0.0.3 (October 22nd, 2008)*
* Tagged v0.0.3
* Test cases cleanup
* Sugar syntax for AssociationCollection#size
* Use loaded collection, instead of read from cache, when use scoped find form AssociationCollection
author.posts.find(1) # no cache read for #find
* Use loaded collection, instead of read from cache, when use #size, #empty? and #any? from AssociationCollection. Added support for :uniq option.
* Reduced cache overhead using read instead of fetch for access to AssociationCollection. Enhanced Mocha expectactions.
# BEFORE
author.posts # => cache fetch
# NOW
author.posts # => cache read
* Fixed typos in CHANGELOG and README
* Don't instantiate ivar when read from AssociationCollection if options[:cached] == true
* Reduced by half cache lookups when read from AssociationCollection
# BEFORE
author.posts # => cache read + cache fetch
# NOW
author.posts # => cache fetch
* Fixed Mocha expectations
* Fixed clear, delete and destroy cases for AssociationCollection
author.posts.delete(post)
author.posts.delete_all
author.posts.destroy
author.posts.destroy_all
author.posts.clear
* Fixed concurrency issues, using Thread#current to store cached_associations instead of ivar
* Make sure tests suite runs in 'test' environment. Introduced SKIP_MOCHA env variable, in order to run tests directly on cache
$ rake cached_models SKIP_MOCHA=true
* Bypass cache for will_paginate on association collection
author.posts.paginate(:all, :page => 1, :per_page => 10)
* Make sure habtm and has_one are safely used
*0.0.2 (October 10th, 2008)*
* Updated README with new installation instructions
* Created separated folder for ActiveRecord
* Added dist related Rake tasks
* Added gem related files
* Added Git related Rake tasks
* Removed default configuration for cache lookup
* Make sure cache is always used by all the instances which reference the same record
* Made independent of Rails
* Allow test suite to work without any active cache server
* Enhanced AssociationCollection test coverage
* ActiveRecord::Base#expire_cache_for now uses the new cache access API
* Abstracted ActiveRecord::Base#cache_fetch in order to normalize cache access for <reflection_name>_ids
* Reduced the amount of cache hits, caching the status of cached relations with ActiveRecord::Base#cached_associations
*0.0.1 (September 10th, 2008)*
* Updated README with project informations
* Make sure 'test' is the default Rake task
* Added project description to README. Added about.yml.
* Updated README with informations about required environment settings
* Only load the plugin if the current environment has the cache turned on
* Added support for cache expiration on after_save callback
* Make sure to use ActiveRecord cache proxy for test suite
* Make sure test suite will run using RAILS_ENV in test mode
* Added support for scoped finders in AssociationCollection. Fixed cache renewal for AssociationCollection#delete.
* Added support for cache renewal on AssociationCollection methods
* Added support for cache expiration on direct associated objects updates
* Updated README example
* Removed CacheObserver. Fixed cache expiration for has_many relation.
* Introducing CacheObserver in order to transparently handle cache expiring for has_many macro
* Test enhancements for AssociationCollection#<< on polymorphic associations
* Test enhancements for AssociationCollection#<<. Make sure to expire caches when an associated object changes owner.
class Author < ActiveRecord::Base
has_many :posts, :cached => true
end
post = author.posts.last
another_author.posts << post # => refresh both author and another_author caches
* AssociationCollection#<< support
class Author < ActiveRecord::Base
has_many :posts, :cached => true
end
author.posts << post # => causes a refresh of cached posts
* has_many association support
class Author < ActiveRecord::Base
has_many :posts, :cached => true
end