find_cache 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/CHANGE-LOG +8 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +80 -0
  4. data/Rakefile +38 -0
  5. data/lib/find_cache.rb +5 -0
  6. data/lib/find_cache/cacheable.rb +88 -0
  7. data/lib/find_cache/init.rb +1 -0
  8. data/lib/find_cache/key_gen.rb +27 -0
  9. data/lib/find_cache/version.rb +3 -0
  10. data/lib/tasks/find_cache_tasks.rake +4 -0
  11. data/test/dummy/README.rdoc +261 -0
  12. data/test/dummy/Rakefile +7 -0
  13. data/test/dummy/app/assets/javascripts/application.js +15 -0
  14. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  15. data/test/dummy/app/controllers/application_controller.rb +3 -0
  16. data/test/dummy/app/helpers/application_helper.rb +2 -0
  17. data/test/dummy/app/models/comment.rb +6 -0
  18. data/test/dummy/app/models/post.rb +7 -0
  19. data/test/dummy/app/models/user.rb +13 -0
  20. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  21. data/test/dummy/config.ru +4 -0
  22. data/test/dummy/config/application.rb +59 -0
  23. data/test/dummy/config/boot.rb +10 -0
  24. data/test/dummy/config/database.yml +25 -0
  25. data/test/dummy/config/environment.rb +5 -0
  26. data/test/dummy/config/environments/development.rb +39 -0
  27. data/test/dummy/config/environments/production.rb +67 -0
  28. data/test/dummy/config/environments/test.rb +37 -0
  29. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  30. data/test/dummy/config/initializers/counter_cache_patch.rb +19 -0
  31. data/test/dummy/config/initializers/inflections.rb +15 -0
  32. data/test/dummy/config/initializers/mime_types.rb +5 -0
  33. data/test/dummy/config/initializers/secret_token.rb +7 -0
  34. data/test/dummy/config/initializers/session_store.rb +8 -0
  35. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  36. data/test/dummy/config/locales/en.yml +5 -0
  37. data/test/dummy/config/routes.rb +58 -0
  38. data/test/dummy/db/development.sqlite3 +0 -0
  39. data/test/dummy/db/migrate/20120824210455_create_users.rb +10 -0
  40. data/test/dummy/db/migrate/20120824210731_create_comments.rb +11 -0
  41. data/test/dummy/db/migrate/20120824210927_create_posts.rb +13 -0
  42. data/test/dummy/db/schema.rb +43 -0
  43. data/test/dummy/db/test.sqlite3 +0 -0
  44. data/test/dummy/log/development.log +498 -0
  45. data/test/dummy/log/test.log +224 -0
  46. data/test/dummy/public/404.html +26 -0
  47. data/test/dummy/public/422.html +26 -0
  48. data/test/dummy/public/500.html +25 -0
  49. data/test/dummy/public/favicon.ico +0 -0
  50. data/test/dummy/script/rails +6 -0
  51. data/test/dummy/test/fixtures/comments.yml +9 -0
  52. data/test/dummy/test/fixtures/posts.yml +13 -0
  53. data/test/dummy/test/fixtures/users.yml +9 -0
  54. data/test/dummy/test/unit/comment_test.rb +7 -0
  55. data/test/dummy/test/unit/post_test.rb +7 -0
  56. data/test/dummy/test/unit/user_test.rb +7 -0
  57. data/test/dummy/tmp/cache/26E/540/User%2F1 +0 -0
  58. data/test/dummy/tmp/cache/26F/550/User%2F2 +0 -0
  59. data/test/dummy/tmp/cache/270/560/User%2F3 +0 -0
  60. data/test/dummy/tmp/cache/271/570/User%2F4 +0 -0
  61. data/test/dummy/tmp/cache/272/580/User%2F5 +0 -0
  62. data/test/dummy/tmp/cache/273/590/User%2F6 +0 -0
  63. data/test/dummy/tmp/cache/275/6E0/Post%2F1 +0 -0
  64. data/test/dummy/tmp/cache/276/6F0/Post%2F2 +0 -0
  65. data/test/dummy/tmp/cache/277/700/Post%2F3 +0 -0
  66. data/test/dummy/tmp/cache/3A8/070/Comment%2F7 +0 -0
  67. data/test/dummy/tmp/cache/3A9/080/Comment%2F8 +0 -0
  68. data/test/dummy/tmp/cache/3AA/090/Comment%2F9 +0 -0
  69. data/test/dummy/tmp/cache/3D2/D30/Comment%2F10 +0 -0
  70. data/test/dummy/tmp/cache/3D4/D50/Comment%2F12 +0 -0
  71. data/test/dummy/tmp/cache/3D5/D60/Comment%2F13 +0 -0
  72. data/test/dummy/tmp/cache/3D6/D70/Comment%2F14 +0 -0
  73. data/test/dummy/tmp/cache/3D7/D80/Comment%2F15 +0 -0
  74. data/test/dummy/tmp/cache/58D/B70/Post%2Fuser_id-1 +1 -0
  75. data/test/find_cache_test.rb +51 -0
  76. data/test/test_helper.rb +15 -0
  77. metadata +261 -0
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,58 @@
1
+ Dummy::Application.routes.draw do
2
+ # The priority is based upon order of creation:
3
+ # first created -> highest priority.
4
+
5
+ # Sample of regular route:
6
+ # match 'products/:id' => 'catalog#view'
7
+ # Keep in mind you can assign values other than :controller and :action
8
+
9
+ # Sample of named route:
10
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
+ # This route can be invoked with purchase_url(:id => product.id)
12
+
13
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
14
+ # resources :products
15
+
16
+ # Sample resource route with options:
17
+ # resources :products do
18
+ # member do
19
+ # get 'short'
20
+ # post 'toggle'
21
+ # end
22
+ #
23
+ # collection do
24
+ # get 'sold'
25
+ # end
26
+ # end
27
+
28
+ # Sample resource route with sub-resources:
29
+ # resources :products do
30
+ # resources :comments, :sales
31
+ # resource :seller
32
+ # end
33
+
34
+ # Sample resource route with more complex sub-resources
35
+ # resources :products do
36
+ # resources :comments
37
+ # resources :sales do
38
+ # get 'recent', :on => :collection
39
+ # end
40
+ # end
41
+
42
+ # Sample resource route within a namespace:
43
+ # namespace :admin do
44
+ # # Directs /admin/products/* to Admin::ProductsController
45
+ # # (app/controllers/admin/products_controller.rb)
46
+ # resources :products
47
+ # end
48
+
49
+ # You can have the root of your site routed with "root"
50
+ # just remember to delete public/index.html.
51
+ # root :to => 'welcome#index'
52
+
53
+ # See how all your routes lay out with "rake routes"
54
+
55
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
56
+ # Note: This route will make all actions in every controller accessible via GET requests.
57
+ # match ':controller(/:action(/:id))(.:format)'
58
+ end
Binary file
@@ -0,0 +1,10 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :email
5
+ t.string :password
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ class CreateComments < ActiveRecord::Migration
2
+ def change
3
+ create_table :comments do |t|
4
+ t.references :post
5
+ t.text :content
6
+
7
+ t.timestamps
8
+ end
9
+ add_index :comments, :post_id
10
+ end
11
+ end
@@ -0,0 +1,13 @@
1
+ class CreatePosts < ActiveRecord::Migration
2
+ def change
3
+ create_table :posts do |t|
4
+ t.references :user
5
+ t.string :title
6
+ t.text :body
7
+ t.integer :comments_count
8
+
9
+ t.timestamps
10
+ end
11
+ add_index :posts, :user_id
12
+ end
13
+ end
@@ -0,0 +1,43 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20120824210927) do
15
+
16
+ create_table "comments", :force => true do |t|
17
+ t.integer "post_id"
18
+ t.text "content"
19
+ t.datetime "created_at", :null => false
20
+ t.datetime "updated_at", :null => false
21
+ end
22
+
23
+ add_index "comments", ["post_id"], :name => "index_comments_on_post_id"
24
+
25
+ create_table "posts", :force => true do |t|
26
+ t.integer "user_id"
27
+ t.string "title"
28
+ t.text "body"
29
+ t.integer "comments_count"
30
+ t.datetime "created_at", :null => false
31
+ t.datetime "updated_at", :null => false
32
+ end
33
+
34
+ add_index "posts", ["user_id"], :name => "index_posts_on_user_id"
35
+
36
+ create_table "users", :force => true do |t|
37
+ t.string "email"
38
+ t.string "password"
39
+ t.datetime "created_at", :null => false
40
+ t.datetime "updated_at", :null => false
41
+ end
42
+
43
+ end
Binary file
@@ -0,0 +1,498 @@
1
+ Connecting to database specified by database.yml
2
+ Connecting to database specified by database.yml
3
+  (0.2ms) select sqlite_version(*)
4
+  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
5
+  (0.0ms) PRAGMA index_list("schema_migrations")
6
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
7
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
8
+ Migrating to CreatePosts (20120824142626)
9
+  (0.0ms) begin transaction
10
+  (0.4ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
11
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824142626')
12
+  (1.8ms) commit transaction
13
+  (0.3ms) select sqlite_version(*)
14
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
15
+  (0.0ms) PRAGMA index_list("posts")
16
+ Connecting to database specified by database.yml
17
+ Connecting to database specified by database.yml
18
+ Connecting to database specified by database.yml
19
+ Connecting to database specified by database.yml
20
+ Connecting to database specified by database.yml
21
+ Connecting to database specified by database.yml
22
+ Connecting to database specified by database.yml
23
+ Connecting to database specified by database.yml
24
+ Connecting to database specified by database.yml
25
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
26
+ Migrating to CreateUsers (20120824144824)
27
+  (0.0ms) select sqlite_version(*)
28
+  (0.0ms) begin transaction
29
+  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "username" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
30
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144824')
31
+  (2.8ms) commit transaction
32
+ Migrating to CreateUserDetails (20120824144920)
33
+  (0.0ms) begin transaction
34
+  (0.4ms) CREATE TABLE "user_details" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "age" integer, "location" varchar(255), "bio" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
35
+  (0.0ms) PRAGMA index_list("user_details")
36
+  (0.1ms) CREATE INDEX "index_user_details_on_user_id" ON "user_details" ("user_id")
37
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144920')
38
+  (1.9ms) commit transaction
39
+  (0.4ms) select sqlite_version(*)
40
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
41
+  (0.0ms) PRAGMA index_list("posts")
42
+  (0.0ms) PRAGMA index_list("user_details")
43
+  (0.0ms) PRAGMA index_info('index_user_details_on_user_id')
44
+  (0.0ms) PRAGMA index_list("users")
45
+ Connecting to database specified by database.yml
46
+  (0.1ms) select sqlite_version(*)
47
+  (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
48
+  (0.0ms) PRAGMA index_list("schema_migrations")
49
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
50
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
51
+ Migrating to CreateUsers (20120824144824)
52
+  (0.0ms) begin transaction
53
+  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "username" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
54
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144824')
55
+  (1.2ms) commit transaction
56
+ Migrating to CreateUserDetails (20120824144920)
57
+  (0.0ms) begin transaction
58
+  (0.4ms) CREATE TABLE "user_details" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "age" integer, "location" varchar(255), "bio" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
59
+  (0.0ms) PRAGMA index_list("user_details")
60
+  (0.1ms) CREATE INDEX "index_user_details_on_user_id" ON "user_details" ("user_id")
61
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144920')
62
+  (1.5ms) commit transaction
63
+  (0.3ms) select sqlite_version(*)
64
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
65
+  (0.0ms) PRAGMA index_list("user_details")
66
+  (0.0ms) PRAGMA index_info('index_user_details_on_user_id')
67
+  (0.0ms) PRAGMA index_list("users")
68
+ Connecting to database specified by database.yml
69
+ Connecting to database specified by database.yml
70
+ Connecting to database specified by database.yml
71
+ Connecting to database specified by database.yml
72
+ Connecting to database specified by database.yml
73
+ Connecting to database specified by database.yml
74
+ Cache read_multi: ["User/1", "User/2", "User/3"]
75
+ Dalli::Server#connect 127.0.0.1:11211
76
+ Cache write: User/1
77
+ Cache read_multi: ["User/1", "User/2", "User/3"]
78
+ Cache read_multi: ["User/1", "User/2", "User/3"]
79
+ Cache read_multi: ["User/1", "User/2", "User/3"]
80
+ Cache read_multi: ["User/1", "User/2", "User/3"]
81
+ Connecting to database specified by database.yml
82
+ Connecting to database specified by database.yml
83
+ Cache read_multi: ["User/1", "User/2", "User/3"]
84
+ Dalli::Server#connect localhost:11211
85
+ Cache read_multi: ["User/1", "User/2", "User/3"]
86
+ Cache read: asd
87
+ Cache read: User71
88
+ Cache read: User/1
89
+ Connecting to database specified by database.yml
90
+ Dalli::Server#connect localhost:11211
91
+ Connecting to database specified by database.yml
92
+  (0.1ms) select sqlite_version(*)
93
+  (2.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
94
+  (0.0ms) PRAGMA index_list("schema_migrations")
95
+  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
96
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
97
+ Migrating to CreateUsers (20120824144824)
98
+  (0.0ms) begin transaction
99
+  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "username" varchar(255), "user_details_count" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
100
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144824')
101
+  (1.5ms) commit transaction
102
+ Migrating to CreateUserDetails (20120824144920)
103
+  (0.1ms) begin transaction
104
+  (0.5ms) CREATE TABLE "user_details" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "age" integer, "location" varchar(255), "bio" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
105
+  (0.0ms) PRAGMA index_list("user_details")
106
+  (0.1ms) CREATE INDEX "index_user_details_on_user_id" ON "user_details" ("user_id")
107
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144920')
108
+  (1.9ms) commit transaction
109
+  (0.3ms) select sqlite_version(*)
110
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
111
+  (0.0ms) PRAGMA index_list("user_details")
112
+  (0.0ms) PRAGMA index_info('index_user_details_on_user_id')
113
+  (0.0ms) PRAGMA index_list("users")
114
+ Connecting to database specified by database.yml
115
+ Dalli::Server#connect localhost:11211
116
+ Cache read: UserDetail/user_id-1
117
+ Cache read: User/user_id-1
118
+ Cache read: User/user_id-1
119
+ Cache read: User/user_id-1
120
+ Cache read: User/user_id-1
121
+ Connecting to database specified by database.yml
122
+ Cache read: UserDetail/user_id-1
123
+ Dalli::Server#connect localhost:11211
124
+ Cache read: UserDetail/user_id-1
125
+ Cache read: User/
126
+ Cache generate: User/
127
+ Cache write: User/
128
+ Connecting to database specified by database.yml
129
+  (0.2ms) select sqlite_version(*)
130
+  (2.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
131
+  (0.1ms) PRAGMA index_list("schema_migrations")
132
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
133
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
134
+ Migrating to CreateUsers (20120824144824)
135
+  (0.0ms) begin transaction
136
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "username" varchar(255), "user_detail_count" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
137
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144824')
138
+  (1.7ms) commit transaction
139
+ Migrating to CreateUserDetails (20120824144920)
140
+  (0.1ms) begin transaction
141
+  (0.5ms) CREATE TABLE "user_details" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "age" integer, "location" varchar(255), "bio" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
142
+  (0.0ms) PRAGMA index_list("user_details")
143
+  (0.1ms) CREATE INDEX "index_user_details_on_user_id" ON "user_details" ("user_id")
144
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144920')
145
+  (1.6ms) commit transaction
146
+  (0.3ms) select sqlite_version(*)
147
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
148
+  (0.0ms) PRAGMA index_list("user_details")
149
+  (0.0ms) PRAGMA index_info('index_user_details_on_user_id')
150
+  (0.0ms) PRAGMA index_list("users")
151
+ Connecting to database specified by database.yml
152
+ Dalli::Server#connect localhost:11211
153
+ Cache read: User/1
154
+ Cache generate: User/1
155
+ Cache write: User/1
156
+ Connecting to database specified by database.yml
157
+ Cache read: User/1
158
+ Dalli::Server#connect localhost:11211
159
+ Cache fetch_hit: User/1
160
+ Connecting to database specified by database.yml
161
+  (0.1ms) select sqlite_version(*)
162
+  (2.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
163
+  (0.0ms) PRAGMA index_list("schema_migrations")
164
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
165
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
166
+ Migrating to CreateUsers (20120824144824)
167
+  (0.0ms) begin transaction
168
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "username" varchar(255), "user_details_count" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
169
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144824')
170
+  (1.7ms) commit transaction
171
+ Migrating to CreateUserDetails (20120824144920)
172
+  (0.0ms) begin transaction
173
+  (0.5ms) CREATE TABLE "user_details" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "age" integer, "location" varchar(255), "bio" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
174
+  (0.0ms) PRAGMA index_list("user_details")
175
+  (0.2ms) CREATE INDEX "index_user_details_on_user_id" ON "user_details" ("user_id")
176
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824144920')
177
+  (1.7ms) commit transaction
178
+  (0.4ms) select sqlite_version(*)
179
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
180
+  (0.0ms) PRAGMA index_list("user_details")
181
+  (0.0ms) PRAGMA index_info('index_user_details_on_user_id')
182
+  (0.0ms) PRAGMA index_list("users")
183
+ Connecting to database specified by database.yml
184
+ Dalli::Server#connect localhost:11211
185
+ Cache read: User/1
186
+ Cache generate: User/1
187
+ Cache write: User/1
188
+ Connecting to database specified by database.yml
189
+ Cache read: User/1
190
+ Dalli::Server#connect localhost:11211
191
+ Cache fetch_hit: User/1
192
+ SQLite3::SQLException: no such column: true: UPDATE "users" SET "true" = COALESCE("true", 0) + 1 WHERE "users"."id" = 1
193
+ Connecting to database specified by database.yml
194
+ Cache read: User/1
195
+ Dalli::Server#connect localhost:11211
196
+ Cache fetch_hit: User/1
197
+ Connecting to database specified by database.yml
198
+ Dalli::Server#connect localhost:11211
199
+ Cache read: User/1
200
+ Cache fetch_hit: User/1
201
+ Connecting to database specified by database.yml
202
+ Dalli::Server#connect localhost:11211
203
+ Cache read: User/1
204
+ Cache fetch_hit: User/1
205
+ Connecting to database specified by database.yml
206
+ Cache read: UserDetail/user_id-1
207
+ Dalli::Server#connect localhost:11211
208
+ Cache read: UserDetail/user_id-1
209
+ Cache read: UserDetail/user_id-1
210
+ Cache read: UserDetail/user_id-1
211
+ Cache read: UserDetail/user_id-1
212
+ Cache read: UserDetail/user_id-1
213
+ Cache read: UserDetail/user_id-1
214
+ Cache read: User/4
215
+ Cache generate: User/4
216
+ Cache write: User/4
217
+ Cache read: User/4
218
+ Cache generate: User/4
219
+ Cache write: User/4
220
+ Cache read: User/4
221
+ Cache generate: User/4
222
+ Cache write: User/4
223
+ Cache read: User/1
224
+ Cache generate: User/1
225
+ Cache write: User/1
226
+ Cache read: User/2
227
+ Cache generate: User/2
228
+ Cache write: User/2
229
+ Cache read: User/2
230
+ Cache generate: User/2
231
+ Cache write: User/2
232
+ Cache read: User/2
233
+ Cache generate: User/2
234
+ Cache write: User/2
235
+ Cache read: User/2
236
+ Cache generate: User/2
237
+ Cache write: User/2
238
+ Cache read: User/2
239
+ Cache generate: User/2
240
+ Cache write: User/2
241
+ Connecting to database specified by database.yml
242
+ Dalli::Server#connect localhost:11211
243
+ Cache read: User/2
244
+ Cache generate: User/2
245
+ Cache write: User/2
246
+ Cache read: User/3
247
+ Cache generate: User/3
248
+ Cache write: User/3
249
+ Cache read: User/4
250
+ Cache generate: User/4
251
+ Cache write: User/4
252
+ Cache read: UserDetail/user_id-1
253
+ Cache write: UserDetail/user_id-1
254
+ Cache write: UserDetail/3
255
+ Cache read: User/3
256
+ Cache generate: User/3
257
+ Cache write: User/3
258
+ Cache read: User/4
259
+ Cache generate: User/4
260
+ Cache write: User/4
261
+ Connecting to database specified by database.yml
262
+ Cache read: UserDetail/user_id-1
263
+ Dalli::Server#connect localhost:11211
264
+ Cache read: UserDetail/3
265
+ Cache generate: UserDetail/3
266
+ Cache write: UserDetail/3
267
+ Cache read: User/5
268
+ Cache generate: User/5
269
+ Cache write: User/5
270
+ Cache read: User/6
271
+ Cache generate: User/6
272
+ Cache write: User/6
273
+ Cache read: UserDetail/user_id-2
274
+ Cache write: UserDetail/user_id-2
275
+ Cache write: UserDetail/6
276
+ Cache read: User/6
277
+ Cache generate: User/6
278
+ Cache write: User/6
279
+ Connecting to database specified by database.yml
280
+ Dalli::Server#connect localhost:11211
281
+ Cache read: User/5
282
+ Cache generate: User/5
283
+ Cache write: User/5
284
+ Cache read: UserDetail/user_id-1
285
+ Cache read: UserDetail/3
286
+ Cache generate: UserDetail/3
287
+ Cache write: UserDetail/3
288
+ Cache read: User/7
289
+ Cache generate: User/7
290
+ Cache write: User/7
291
+ Connecting to database specified by database.yml
292
+ Connecting to database specified by database.yml
293
+ Connecting to database specified by database.yml
294
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
295
+ Migrating to CreateUsers (20120824144824)
296
+ Migrating to CreateUserDetails (20120824144920)
297
+ Migrating to CreatePosts (20120824174737)
298
+  (0.0ms) select sqlite_version(*)
299
+  (0.1ms) begin transaction
300
+  (0.5ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "body" text, "comments_count" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
301
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824174737')
302
+  (2.5ms) commit transaction
303
+ Migrating to CreateComments (20120824174752)
304
+  (0.0ms) begin transaction
305
+  (0.6ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "body" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
306
+  (0.0ms) PRAGMA index_list("comments")
307
+  (0.1ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
308
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824174752')
309
+  (2.2ms) commit transaction
310
+  (0.3ms) select sqlite_version(*)
311
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
312
+  (0.0ms) PRAGMA index_list("comments")
313
+  (0.0ms) PRAGMA index_info('index_comments_on_post_id')
314
+  (0.0ms) PRAGMA index_list("posts")
315
+  (0.0ms) PRAGMA index_list("user_details")
316
+  (0.0ms) PRAGMA index_info('index_user_details_on_user_id')
317
+  (0.0ms) PRAGMA index_list("users")
318
+ Connecting to database specified by database.yml
319
+ Dalli::Server#connect localhost:11211
320
+ Cache read: Post/1
321
+ Cache generate: Post/1
322
+ Cache write: Post/1
323
+ Connecting to database specified by database.yml
324
+ Connecting to database specified by database.yml
325
+ Dalli::Server#connect localhost:11211
326
+ Connecting to database specified by database.yml
327
+ Dalli::Server#connect localhost:11211
328
+ Cache read: Post/1
329
+ Cache generate: Post/1
330
+ Cache write: Post/1
331
+ Cache read: Comment/1
332
+ Cache generate: Comment/1
333
+ Cache write: Comment/1
334
+ Cache read: Comment/2
335
+ Cache generate: Comment/2
336
+ Cache write: Comment/2
337
+ Cache read: Comment/[1, 2, 3]
338
+ Cache generate: Comment/[1, 2, 3]
339
+ Cache write: Comment/[1, 2, 3]
340
+ Cache read_multi: ["Comment/1", "Comment/2", "Comment/3"]
341
+ Cache write: Comment/3
342
+ Cache read: Post/1
343
+ Cache generate: Post/1
344
+ Cache write: Post/1
345
+ Connecting to database specified by database.yml
346
+ Cache read: Post/1
347
+ Dalli::Server#connect localhost:11211
348
+ Cache generate: Post/1
349
+ Cache write: Post/1
350
+ Connecting to database specified by database.yml
351
+ Cache read: Post/1
352
+ Dalli::Server#connect localhost:11211
353
+ Cache fetch_hit: Post/1
354
+ Cache read: Post/1
355
+ Cache generate: Post/1
356
+ Cache write: Post/1
357
+ Connecting to database specified by database.yml
358
+ Cache read: Post/1
359
+ Dalli::Server#connect localhost:11211
360
+ Cache fetch_hit: Post/1
361
+ Cache read: Post/1
362
+ Cache generate: Post/1
363
+ Cache write: Post/1
364
+ Cache read: Comment/post_id-1
365
+ Cache write: Comment/post_id-1
366
+ Cache write: Comment/1
367
+ Cache read: Comment/post_id-1
368
+ Cache read: Comment/1
369
+ Cache fetch_hit: Comment/1
370
+ Cache read: Comment/post_id-1
371
+ Connecting to database specified by database.yml
372
+ Connecting to database specified by database.yml
373
+ Connecting to database specified by database.yml
374
+ Connecting to database specified by database.yml
375
+ Connecting to database specified by database.yml
376
+ Connecting to database specified by database.yml
377
+ Connecting to database specified by database.yml
378
+ Connecting to database specified by database.yml
379
+ Connecting to database specified by database.yml
380
+ Connecting to database specified by database.yml
381
+ Connecting to database specified by database.yml
382
+ Connecting to database specified by database.yml
383
+ Connecting to database specified by database.yml
384
+ Connecting to database specified by database.yml
385
+  (0.1ms) select sqlite_version(*)
386
+  (2.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
387
+  (0.1ms) PRAGMA index_list("schema_migrations")
388
+  (1.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
389
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
390
+ Migrating to CreateUsers (20120824210455)
391
+  (0.0ms) begin transaction
392
+  (0.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "password" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
393
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824210455')
394
+  (1.3ms) commit transaction
395
+ Migrating to CreateUserDetails (20120824210529)
396
+  (0.0ms) begin transaction
397
+  (0.6ms) CREATE TABLE "user_details" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "name" varchar(255), "age" integer, "sex" varchar(255), "location" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
398
+  (0.0ms) PRAGMA index_list("user_details")
399
+  (0.1ms) CREATE INDEX "index_user_details_on_user_id" ON "user_details" ("user_id")
400
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824210529')
401
+  (2.0ms) commit transaction
402
+ Migrating to CreatePosts (20120824210653)
403
+  (0.0ms) begin transaction
404
+  (0.3ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "body" text, "comments_count" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
405
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824210653')
406
+  (1.2ms) commit transaction
407
+ Migrating to CreateComments (20120824210731)
408
+  (0.0ms) begin transaction
409
+  (0.5ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "content" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
410
+  (0.1ms) PRAGMA index_list("comments")
411
+  (0.2ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
412
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824210731')
413
+  (1.2ms) commit transaction
414
+  (0.5ms) select sqlite_version(*)
415
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
416
+  (0.0ms) PRAGMA index_list("comments")
417
+  (0.0ms) PRAGMA index_info('index_comments_on_post_id')
418
+  (0.0ms) PRAGMA index_list("posts")
419
+  (0.0ms) PRAGMA index_list("user_details")
420
+  (0.0ms) PRAGMA index_info('index_user_details_on_user_id')
421
+  (0.0ms) PRAGMA index_list("users")
422
+ Connecting to database specified by database.yml
423
+ Connecting to database specified by database.yml
424
+ Connecting to database specified by database.yml
425
+ Connecting to database specified by database.yml
426
+  (0.2ms) select sqlite_version(*)
427
+  (2.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
428
+  (0.0ms) PRAGMA index_list("schema_migrations")
429
+  (1.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
430
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
431
+ Migrating to CreateUsers (20120824210455)
432
+  (0.0ms) begin transaction
433
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "password" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
434
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824210455')
435
+  (1.7ms) commit transaction
436
+ Migrating to CreateComments (20120824210731)
437
+  (0.0ms) begin transaction
438
+  (0.5ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "content" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
439
+  (0.0ms) PRAGMA index_list("comments")
440
+  (0.1ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
441
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824210731')
442
+  (2.1ms) commit transaction
443
+ Migrating to CreatePosts (20120824210927)
444
+  (0.1ms) begin transaction
445
+  (0.5ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "title" varchar(255), "body" text, "comments_count" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
446
+  (0.0ms) PRAGMA index_list("posts")
447
+  (0.2ms) CREATE INDEX "index_posts_on_user_id" ON "posts" ("user_id")
448
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120824210927')
449
+  (1.8ms) commit transaction
450
+  (0.3ms) select sqlite_version(*)
451
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
452
+  (0.0ms) PRAGMA index_list("comments")
453
+  (0.0ms) PRAGMA index_info('index_comments_on_post_id')
454
+  (0.0ms) PRAGMA index_list("posts")
455
+  (0.0ms) PRAGMA index_info('index_posts_on_user_id')
456
+  (0.0ms) PRAGMA index_list("users")
457
+ Connecting to database specified by database.yml
458
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
459
+  (0.4ms) select sqlite_version(*)
460
+  (2.2ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "content" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
461
+  (0.0ms) PRAGMA index_list("comments")
462
+  (1.4ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
463
+  (1.5ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "title" varchar(255), "body" text, "comments_count" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
464
+  (0.0ms) PRAGMA index_list("posts")
465
+  (1.8ms) CREATE INDEX "index_posts_on_user_id" ON "posts" ("user_id")
466
+  (1.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "password" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
467
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
468
+  (0.0ms) PRAGMA index_list("schema_migrations")
469
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
470
+  (0.1ms) SELECT version FROM "schema_migrations"
471
+  (2.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120824210927')
472
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120824210455')
473
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120824210731')
474
+ Connecting to database specified by database.yml
475
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
476
+  (0.4ms) select sqlite_version(*)
477
+  (2.7ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "post_id" integer, "content" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
478
+  (0.0ms) PRAGMA index_list("comments")
479
+  (1.6ms) CREATE INDEX "index_comments_on_post_id" ON "comments" ("post_id")
480
+  (1.6ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "user_id" integer, "title" varchar(255), "body" text, "comments_count" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
481
+  (0.0ms) PRAGMA index_list("posts")
482
+  (1.4ms) CREATE INDEX "index_posts_on_user_id" ON "posts" ("user_id")
483
+  (1.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar(255), "password" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
484
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
485
+  (0.0ms) PRAGMA index_list("schema_migrations")
486
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
487
+  (0.1ms) SELECT version FROM "schema_migrations"
488
+  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20120824210927')
489
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120824210455')
490
+  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20120824210731')
491
+ Connecting to database specified by database.yml
492
+ Dalli::Server#connect localhost:11211
493
+ Cache read: User/1
494
+ Cache generate: User/1
495
+ Cache write: User/1
496
+ Cache read: Post/user_id-1
497
+ Cache write: Post/user_id-1
498
+ Cache write: Post/1