{"id":15490316,"url":"https://github.com/tsukasaoishi/bitzer_store","last_synced_at":"2025-10-05T12:45:26.618Z","repository":{"id":7879755,"uuid":"9254479","full_name":"tsukasaoishi/bitzer_store","owner":"tsukasaoishi","description":"BitzerStore can treat multiple cache clusters in Rails.","archived":false,"fork":false,"pushed_at":"2022-05-13T07:01:38.000Z","size":24,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-13T07:01:55.518Z","etag":null,"topics":["cache-cluster","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsukasaoishi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-06T02:45:50.000Z","updated_at":"2023-09-08T13:31:34.000Z","dependencies_parsed_at":"2022-09-03T08:51:25.834Z","dependency_job_id":null,"html_url":"https://github.com/tsukasaoishi/bitzer_store","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsukasaoishi%2Fbitzer_store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsukasaoishi%2Fbitzer_store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsukasaoishi%2Fbitzer_store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsukasaoishi%2Fbitzer_store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsukasaoishi","download_url":"https://codeload.github.com/tsukasaoishi/bitzer_store/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245052659,"owners_count":20553162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache-cluster","rails","ruby"],"created_at":"2024-10-02T07:20:29.946Z","updated_at":"2025-10-05T12:45:21.567Z","avatar_url":"https://github.com/tsukasaoishi.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BitzerStore\n\n[![Gem Version](https://badge.fury.io/rb/bitzer_store.svg)](http://badge.fury.io/rb/bitzer_store) [![Build Status](https://travis-ci.org/tsukasaoishi/bitzer_store.svg?branch=master)](https://travis-ci.org/tsukasaoishi/bitzer_store) [![Code Climate](https://codeclimate.com/github/tsukasaoishi/bitzer_store/badges/gpa.svg)](https://codeclimate.com/github/tsukasaoishi/bitzer_store)\n\nThe cache of Rails uses the cache cluster only one.\nBitzerStore can treat multiple cache clusters.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'bitzer_store'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install bitzer_store\n\n## Usage\n\n1.config\nat ```config/environments/*.rb```\n\n```ruby\nMyApp::Application.configure do\n  BitzerStore.configure(config) do |cache|\n    cache.default :mem_cache_store, \"server0\"\n    cache.top_page :mem_cache_store, \"server1\", \"server2\"\n    cache.obj :dalli, \"server3\" \n    cache.footer :file_store, \"/tmp\"\n  end\nend\n```\n\nThe ```xxx``` of ```cache.xxx``` is name of cache cluster.\nYou should supply ```cache.default``` which is used to cache cluster of default.\n\nYou can specify the setting common items. \nSetting common items will be overwritten with individual setting.\n\n```ruby\nMyApp::Application.configure do\n  BitzerStore.configure(config) do |cache|\n    cache.common_setting :memcache_store, \"server0\", :expires_in =\u003e 600\n    cache.default :namespace =\u003e \"tsu\"\n    cache.top_page :dalli, \"server1\"\n  end\nend\n```\n\nThe contents of the above is the same as below.\n\n```ruby\nMyApp::Application.configure do\n  BitzerStore.configure(config) do |cache|\n    cache.default :memcache_store, \"server0\", :expires_in =\u003e 600, :namespace =\u003e \"tsu\"\n    cache.top_page :dalli, \"server1\", :expires_in =\u003e 600 \n  end\nend\n```\n\n2.Rails.cache\nWhen specify no name, to use default cache cluster.\n\n```ruby\nRails.cache.read(\"a\")\n```\n\nSupply an options with a :sheep key. It's value is cache cluster name.\n\n```ruby\nRails.cache.read(\"a\", :sheep =\u003e :cluster_a)\n```\n\ncaches_action, fragment_cache are the same.\n\n```ruby\n\u003c% cache \"page\", :sheep =\u003e :cluster_a do %\u003e\n  \u003c%= somethong %\u003e\n\u003c% end %\u003e\n```\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsukasaoishi%2Fbitzer_store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsukasaoishi%2Fbitzer_store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsukasaoishi%2Fbitzer_store/lists"}