Sha256: 6330d7282174a9e9f197dc761020f93c4186f7f2a7d30ccb077ca92f5ce335fc

Contents?: true

Size: 828 Bytes

Versions: 3

Compression:

Stored size: 828 Bytes

Contents

= CacheVersion

CacheVersion lets you maintain a version for any class. This can be used for cache
invalidation, and RecordCache and MethodCache use it for that. It uses memcache to reduce
database access when the version of a class hasn't changed.

== Usage:

  CacheVersion.get(User)
  # => 0
  
  CacheVersion.increment(User)
  CacheVersion.get(User)
  # => 1

  # Or you can use the alternate syntax:

  User.version
  # => 1

  User.increment_version
  User.version
  # => 2

== Install:

  sudo gem install cache-version -s http://gemcutter.org

Also, you need to create a migration to make the cache_versions table. See examples/sample_migration.rb

== Dependencies:

* {memcache}[http://github.com/ninjudd/memcache]

== License:

Copyright (c) 2009 Justin Balthrop, Geni.com; Published under The MIT License, see LICENSE

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cache_version-1.0.0 README.rdoc
cache_version-0.9.5 README.rdoc
cache_version-0.9.4 README.rdoc