Created
March 30, 2010 08:44
-
-
Save maiha/348918 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # kyotocabinet: 0.9.9 | |
| # kyotocabinet-ruby: 1.1 | |
| # integer with ファイルハッシュDB | |
| KyotoCabinet::DB.process('casket.kch'){|db| | |
| db['foo'] = 1 | |
| p db['foo'] | |
| # => "1" | |
| } | |
| # symbol with キャッシュDB | |
| hash = KyotoCabinet::DB.new | |
| hash.open('*') | |
| hash['foo'] = :xxx | |
| p hash['foo'] | |
| # => "xxx" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment