Skip to content

Instantly share code, notes, and snippets.

@sinefunc
Created May 16, 2010 22:01
Show Gist options
  • Save sinefunc/403202 to your computer and use it in GitHub Desktop.
Save sinefunc/403202 to your computer and use it in GitHub Desktop.
class Join
def self.[](id)
super && db.exists(key(id, :exists))
end
def create
super
set key(:exists), 1
expire key(:exists), 300
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment