model_cache:用于缓存模型代码的 Rails 插件

时间:2021-06-29 17:35:24
【文件属性】:
文件名称:model_cache:用于缓存模型代码的 Rails 插件
文件大小:6KB
文件格式:ZIP
更新时间:2021-06-29 17:35:24
Ruby 模型缓存 ModelCache 是一个简单的 Rails 缓存插件,使用memcached 。 它为您的模型提供缓存功能,允许: 基于通用键(ActiveRecord cache_key在幕后添加)在模型实例方法中缓存代码块 缓存您的实例方法,可选择使用生存时间设置 缓存一些通用代码(例如在您的类方法中) 支持 memcached 客户端 gem、 memcache-client和memcached 。 您只需要创建一个客户端实例并将其存储在CACHE常量中。 安装 作为宝石: gem install model-cache 作为插件: script/plugin install git://github.com/moskyt/model_cache.git 或者 script/plugin install http://github.com/moskyt/model_c
【文件预览】:
model_cache-master
----uninstall.rb(27B)
----.gitignore(6B)
----CHANGELOG(34B)
----README.textile(2KB)
----lib()
--------model-cache.rb(3KB)
----MIT-LICENSE(1KB)
----Rakefile(260B)
----test()
--------model_cache_test.rb(75B)
--------test_helper.rb(78B)
----model-cache.gemspec(482B)
----tasks()
--------model_cache_tasks.rake(89B)
----init.rb(68B)
----install.rb(25B)

网友评论