find_cache 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/find_cache.rb +1 -0
- data/lib/find_cache/cacheable.rb +1 -0
- data/lib/find_cache/init.rb +1 -0
- data/lib/find_cache/key_gen.rb +1 -0
- data/lib/find_cache/version.rb +2 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +51 -0
- data/test/dummy/tmp/cache/274/5A0/User%2F7 +0 -0
- data/test/dummy/tmp/cache/275/6E0/Post%2F1 +0 -0
- data/test/dummy/tmp/cache/3D3/D50/Comment%2F20 +0 -0
- data/test/dummy/tmp/cache/3D9/DA0/Comment%2F17 +0 -0
- data/test/dummy/tmp/cache/3DA/DB0/Comment%2F18 +0 -0
- data/test/dummy/tmp/cache/3DB/DC0/Comment%2F19 +0 -0
- data/test/find_cache_test.rb +1 -1
- data/test/test_helper.rb +1 -0
- metadata +13 -9
data/lib/find_cache.rb
CHANGED
data/lib/find_cache/cacheable.rb
CHANGED
data/lib/find_cache/init.rb
CHANGED
data/lib/find_cache/key_gen.rb
CHANGED
data/lib/find_cache/version.rb
CHANGED
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -222,3 +222,54 @@ Connecting to database specified by database.yml
|
|
222
222
|
[1m[35mUser Load (0.1ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 6 LIMIT 1
|
223
223
|
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" LIMIT 1[0m
|
224
224
|
[1m[35mPost Load (0.3ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."user_id" = 1 LIMIT 1
|
225
|
+
Connecting to database specified by database.yml
|
226
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" LIMIT 1[0m
|
227
|
+
[1m[35m (0.1ms)[0m begin transaction
|
228
|
+
[1m[36mSQL (42.0ms)[0m [1mINSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "test content for comment"], ["created_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00], ["post_id", 1], ["updated_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00]]
|
229
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1
|
230
|
+
[1m[36mSQL (0.3ms)[0m [1mUPDATE "posts" SET "comments_count" = COALESCE("comments_count", 0) + 1 WHERE "posts"."id" = 1[0m
|
231
|
+
[1m[35m (1.9ms)[0m commit transaction
|
232
|
+
[1m[36mPost Load (0.2ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1[0m
|
233
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1
|
234
|
+
[1m[36mPost Load (0.2ms)[0m [1mSELECT "posts".* FROM "posts" LIMIT 1[0m
|
235
|
+
[1m[35m (0.0ms)[0m begin transaction
|
236
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "test 1 content for comment"], ["created_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00], ["post_id", 1], ["updated_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00]]
|
237
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1
|
238
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "posts" SET "comments_count" = COALESCE("comments_count", 0) + 1 WHERE "posts"."id" = 1[0m
|
239
|
+
[1m[35m (2.3ms)[0m commit transaction
|
240
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" LIMIT 1[0m
|
241
|
+
[1m[35m (0.0ms)[0m begin transaction
|
242
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "test 2 content for comment"], ["created_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00], ["post_id", 1], ["updated_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00]]
|
243
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1
|
244
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "posts" SET "comments_count" = COALESCE("comments_count", 0) + 1 WHERE "posts"."id" = 1[0m
|
245
|
+
[1m[35m (1.7ms)[0m commit transaction
|
246
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" LIMIT 1[0m
|
247
|
+
[1m[35m (0.0ms)[0m begin transaction
|
248
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "test 3 content for comment"], ["created_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00], ["post_id", 1], ["updated_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00]]
|
249
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1
|
250
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "posts" SET "comments_count" = COALESCE("comments_count", 0) + 1 WHERE "posts"."id" = 1[0m
|
251
|
+
[1m[35m (1.8ms)[0m commit transaction
|
252
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" LIMIT 1[0m
|
253
|
+
[1m[35m (0.0ms)[0m begin transaction
|
254
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "comments" ("content", "created_at", "post_id", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "test 4 content for comment"], ["created_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00], ["post_id", 1], ["updated_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00]]
|
255
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1
|
256
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "posts" SET "comments_count" = COALESCE("comments_count", 0) + 1 WHERE "posts"."id" = 1[0m
|
257
|
+
[1m[35m (1.4ms)[0m commit transaction
|
258
|
+
[1m[36mComment Load (0.4ms)[0m [1mSELECT "comments".* FROM "comments" WHERE "comments"."id" IN (17, 18, 19, 20) ORDER BY id ASC[0m
|
259
|
+
[1m[35mComment Load (0.2ms)[0m SELECT "comments".* FROM "comments" WHERE "comments"."id" IN (17, 18, 19, 20) ORDER BY id ASC
|
260
|
+
[1m[36mPost Load (0.3ms)[0m [1mSELECT "posts".* FROM "posts" LIMIT 1[0m
|
261
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1
|
262
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
263
|
+
[1m[35m (0.1ms)[0m commit transaction
|
264
|
+
[1m[36mPost Load (0.2ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."id" = 1 LIMIT 1[0m
|
265
|
+
[1m[35mPost Load (0.3ms)[0m SELECT "posts".* FROM "posts" LIMIT 1
|
266
|
+
[1m[36mUser Load (0.1ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1[0m
|
267
|
+
[1m[35m (0.1ms)[0m begin transaction
|
268
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "users" ("created_at", "email", "password", "updated_at") VALUES (?, ?, ?, ?)[0m [["created_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00], ["email", "test@videofork.com"], ["password", "test1234"], ["updated_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00]]
|
269
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "posts" ("body", "comments_count", "created_at", "title", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?) [["body", nil], ["comments_count", nil], ["created_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00], ["title", nil], ["updated_at", Fri, 24 Aug 2012 22:31:19 UTC +00:00], ["user_id", 7]]
|
270
|
+
[1m[36mPost Load (0.1ms)[0m [1mSELECT "posts".* FROM "posts" WHERE "posts"."user_id" = 7 LIMIT 1[0m
|
271
|
+
[1m[35m (2.3ms)[0m commit transaction
|
272
|
+
[1m[36mUser Load (0.3ms)[0m [1mSELECT "users".* FROM "users" WHERE "users"."id" = 7 LIMIT 1[0m
|
273
|
+
[1m[35mUser Load (0.2ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = 7 LIMIT 1
|
274
|
+
[1m[36mUser Load (0.2ms)[0m [1mSELECT "users".* FROM "users" LIMIT 1[0m
|
275
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."user_id" = 1 LIMIT 1
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/find_cache_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: find_cache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.
|
21
|
+
version: 3.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 3.
|
29
|
+
version: 3.2.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: simple_uuid
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- test/dummy/tmp/cache/271/570/User%2F4
|
149
149
|
- test/dummy/tmp/cache/272/580/User%2F5
|
150
150
|
- test/dummy/tmp/cache/273/590/User%2F6
|
151
|
+
- test/dummy/tmp/cache/274/5A0/User%2F7
|
151
152
|
- test/dummy/tmp/cache/275/6E0/Post%2F1
|
152
153
|
- test/dummy/tmp/cache/276/6F0/Post%2F2
|
153
154
|
- test/dummy/tmp/cache/277/700/Post%2F3
|
@@ -155,10 +156,14 @@ files:
|
|
155
156
|
- test/dummy/tmp/cache/3A9/080/Comment%2F8
|
156
157
|
- test/dummy/tmp/cache/3AA/090/Comment%2F9
|
157
158
|
- test/dummy/tmp/cache/3D2/D30/Comment%2F10
|
159
|
+
- test/dummy/tmp/cache/3D3/D50/Comment%2F20
|
158
160
|
- test/dummy/tmp/cache/3D4/D50/Comment%2F12
|
159
161
|
- test/dummy/tmp/cache/3D5/D60/Comment%2F13
|
160
162
|
- test/dummy/tmp/cache/3D6/D70/Comment%2F14
|
161
163
|
- test/dummy/tmp/cache/3D7/D80/Comment%2F15
|
164
|
+
- test/dummy/tmp/cache/3D9/DA0/Comment%2F17
|
165
|
+
- test/dummy/tmp/cache/3DA/DB0/Comment%2F18
|
166
|
+
- test/dummy/tmp/cache/3DB/DC0/Comment%2F19
|
162
167
|
- test/dummy/tmp/cache/58D/B70/Post%2Fuser_id-1
|
163
168
|
- test/find_cache_test.rb
|
164
169
|
- test/test_helper.rb
|
@@ -174,18 +179,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
179
|
- - ! '>='
|
175
180
|
- !ruby/object:Gem::Version
|
176
181
|
version: '0'
|
177
|
-
segments:
|
178
|
-
- 0
|
179
|
-
hash: -1945955979138925529
|
180
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
183
|
none: false
|
182
184
|
requirements:
|
183
185
|
- - ! '>='
|
184
186
|
- !ruby/object:Gem::Version
|
185
187
|
version: '0'
|
186
|
-
segments:
|
187
|
-
- 0
|
188
|
-
hash: -1945955979138925529
|
189
188
|
requirements: []
|
190
189
|
rubyforge_project:
|
191
190
|
rubygems_version: 1.8.24
|
@@ -245,6 +244,7 @@ test_files:
|
|
245
244
|
- test/dummy/tmp/cache/271/570/User%2F4
|
246
245
|
- test/dummy/tmp/cache/272/580/User%2F5
|
247
246
|
- test/dummy/tmp/cache/273/590/User%2F6
|
247
|
+
- test/dummy/tmp/cache/274/5A0/User%2F7
|
248
248
|
- test/dummy/tmp/cache/275/6E0/Post%2F1
|
249
249
|
- test/dummy/tmp/cache/276/6F0/Post%2F2
|
250
250
|
- test/dummy/tmp/cache/277/700/Post%2F3
|
@@ -252,10 +252,14 @@ test_files:
|
|
252
252
|
- test/dummy/tmp/cache/3A9/080/Comment%2F8
|
253
253
|
- test/dummy/tmp/cache/3AA/090/Comment%2F9
|
254
254
|
- test/dummy/tmp/cache/3D2/D30/Comment%2F10
|
255
|
+
- test/dummy/tmp/cache/3D3/D50/Comment%2F20
|
255
256
|
- test/dummy/tmp/cache/3D4/D50/Comment%2F12
|
256
257
|
- test/dummy/tmp/cache/3D5/D60/Comment%2F13
|
257
258
|
- test/dummy/tmp/cache/3D6/D70/Comment%2F14
|
258
259
|
- test/dummy/tmp/cache/3D7/D80/Comment%2F15
|
260
|
+
- test/dummy/tmp/cache/3D9/DA0/Comment%2F17
|
261
|
+
- test/dummy/tmp/cache/3DA/DB0/Comment%2F18
|
262
|
+
- test/dummy/tmp/cache/3DB/DC0/Comment%2F19
|
259
263
|
- test/dummy/tmp/cache/58D/B70/Post%2Fuser_id-1
|
260
264
|
- test/find_cache_test.rb
|
261
265
|
- test/test_helper.rb
|