GitXplorerGitXplorer
n

cache_version

public
6 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
73bc991c7bfa36977442bf843c4fbd15dd03bba1

add license

nninjudd committed 12 years ago
Unverified
1e3fa17e985b0ea69fd65b9c4f1720c57ed966ed

version 1.0.0

nninjudd committed 12 years ago
Unverified
2fb065f86a2915402f0d6dc2fa8449d042e4e6b4

switch from jeweler to plain gemspec

nninjudd committed 12 years ago
Unverified
b5e15f38956bfe93b7caaccedadc188ae41b5ba1

add support for set_version

nninjudd committed 12 years ago
Unverified
4182ad575c00dd76310ec9cdef26a45a49e3e34f

Better way to escape the 'key' column name.

sscott-steadman committed 13 years ago
Unverified
0897d18ccdbb572861d6e115df620eb03ab0896c

Fixed NPE bug.

sscott-steadman committed 14 years ago

README

The README file for this repository.

= 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:

== License:

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