Generates a unique cache key for for Rails classes. Should be used together with dalli gem and memcached.
Add this line to your application's Gemfile:
gem 'class_cacher'
And then execute:
$ bundle
Or install it yourself as:
$ gem install class_cacher
class User < ActiveRecord::Base
unique_class_cache
end
then use it like this
User.unique_class_cache_key
or even better
User.cached_unique_class_cache_key
Should be used together with memcached and the dalli gem (or similar)
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request