kreetitech/cache_fu — pull request #6 by twelvelabs (2013-12-02 23:07:52+00:00)
Title: Rails 2 Support

This pull request adds limited support for Rails 2.3. I didn't support benchmarking because it would have added back a lot of old cruft that didn't seem worth it. The cache_methods were all we needed for our app, and they only required a few lines to get running.

In addition, there are two minor changes:

* Fixed a bug in `get_caches_as_list` where cache_ids that were passed in as integers were no longer matching. Fun fact: one of my coworkers originally contributed that method to cache_fu many years ago: [7aa8de6](https://github.com/kreetitech/cache_fu/commit/7aa8de6b54ee86da0d10ad59a1b02c0cf466d0b4).

* Made the cache_key separator configurable. We're upgrading from the old plugin version (I know... I know...) which used ":" as the key separator rather than "/". Configuring cache_fu to use ":" allows us to upgrade without the mass-eviction of almost all of our model caching.

Note: I bumped the gem version to 0.3 (so I could test against our app), but I tried not to touch much else so that this diff would be as easy to review as possible. Please let me know if you would like additional changes before merging.

Normally I wouldn't bother with adding Rails 2.3 support, but most folks still using cache_fu are probably supporting legacy apps. This gives them an easier upgrade path.

Thanks!