pg_cache_key 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8c8889a9eb692f03886340ddfd969cf715d9d6c
4
- data.tar.gz: 8dbb34f0e7bb48e5512c715879a5c7cb2b785f04
3
+ metadata.gz: 18444cd83cc0ff353a7fb27a934a0150a0b9f91e
4
+ data.tar.gz: 86347b67a0257fbeb7e1cccdb0f167458e2b0317
5
5
  SHA512:
6
- metadata.gz: a1e473e493fbb4dc940c48f1236b5aed014da81d3800c6f85dfacdd88405677f330577900b1c74cd45b271e0525f93b3ef9c58d849bff212148d612d88422f8f
7
- data.tar.gz: fb1ed2615e9e3f789f54915cee9d9c25d4afda29c138c5d949c2993a0323514074a450c3acd4d3f4da232356af631a73c232324a57ecabaea53efac34040e096
6
+ metadata.gz: 9147a0bbe35d9f10861583ff0b927be6b6400112ce444657b20ad347d94c8fde13f9414d2eccbbecfe8562e6e54d5062b75a93c4ea4867dada6eb857b3fd43d3
7
+ data.tar.gz: 508bc258b42ccf84e855222fef3715d79b4e9bfc6ee4dffbb6d8002a8ec668bc1d063b56adcf5ba90a13b4a7a08a0df62ad23aef06ef3528782d509335b0a81f
data/.idea/workspace.xml CHANGED
@@ -8,7 +8,8 @@
8
8
  <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/pg_cache_key.iml" />
9
9
  <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
10
10
  <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
11
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/pg_cache_key.gemspec" afterPath="$PROJECT_DIR$/pg_cache_key.gemspec" />
11
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/pg_cache_key.rb" afterPath="$PROJECT_DIR$/lib/pg_cache_key.rb" />
12
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/pg_cache_key/version.rb" afterPath="$PROJECT_DIR$/lib/pg_cache_key/version.rb" />
12
13
  </list>
13
14
  <ignored path="pg_cache_key.iws" />
14
15
  <ignored path=".idea/workspace.xml" />
@@ -30,11 +31,11 @@
30
31
  </component>
31
32
  <component name="FileEditorManager">
32
33
  <leaf>
33
- <file leaf-file-name="pg_cache_key.rb" pinned="false" current-in-tab="false">
34
+ <file leaf-file-name="pg_cache_key.rb" pinned="false" current-in-tab="true">
34
35
  <entry file="file://$PROJECT_DIR$/lib/pg_cache_key.rb">
35
36
  <provider selected="true" editor-type-id="text-editor">
36
- <state vertical-scroll-proportion="0.0">
37
- <caret line="18" column="155" selection-start-line="18" selection-start-column="155" selection-end-line="18" selection-end-column="155" />
37
+ <state vertical-scroll-proportion="0.64600325">
38
+ <caret line="25" column="34" selection-start-line="25" selection-start-column="34" selection-end-line="25" selection-end-column="34" />
38
39
  <folding />
39
40
  </state>
40
41
  </provider>
@@ -44,7 +45,7 @@
44
45
  <entry file="file://$PROJECT_DIR$/lib/pg_cache_key/version.rb">
45
46
  <provider selected="true" editor-type-id="text-editor">
46
47
  <state vertical-scroll-proportion="0.0">
47
- <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
48
+ <caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
48
49
  <folding />
49
50
  </state>
50
51
  </provider>
@@ -70,11 +71,11 @@
70
71
  </provider>
71
72
  </entry>
72
73
  </file>
73
- <file leaf-file-name="pg_cache_key.gemspec" pinned="false" current-in-tab="true">
74
+ <file leaf-file-name="pg_cache_key.gemspec" pinned="false" current-in-tab="false">
74
75
  <entry file="file://$PROJECT_DIR$/pg_cache_key.gemspec">
75
76
  <provider selected="true" editor-type-id="text-editor">
76
- <state vertical-scroll-proportion="0.25215518">
77
- <caret line="13" column="64" selection-start-line="13" selection-start-column="64" selection-end-line="13" selection-end-column="64" />
77
+ <state vertical-scroll-proportion="0.0">
78
+ <caret line="3" column="21" selection-start-line="3" selection-start-column="9" selection-end-line="3" selection-end-column="21" />
78
79
  <folding />
79
80
  </state>
80
81
  </provider>
@@ -82,18 +83,18 @@
82
83
  </file>
83
84
  <file leaf-file-name="README.md" pinned="false" current-in-tab="false">
84
85
  <entry file="file://$PROJECT_DIR$/README.md">
86
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
87
+ <state />
88
+ </provider>
85
89
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
86
90
  <state split_layout="FIRST">
87
- <first_editor vertical-scroll-proportion="0.31802526">
88
- <caret line="38" column="0" selection-start-line="38" selection-start-column="0" selection-end-line="38" selection-end-column="0" />
91
+ <first_editor vertical-scroll-proportion="0.0">
92
+ <caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
89
93
  <folding />
90
94
  </first_editor>
91
95
  <second_editor />
92
96
  </state>
93
97
  </provider>
94
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
95
- <state />
96
- </provider>
97
98
  </entry>
98
99
  </file>
99
100
  <file leaf-file-name=".gitignore" pinned="false" current-in-tab="false">
@@ -114,10 +115,11 @@
114
115
  <component name="IdeDocumentHistory">
115
116
  <option name="CHANGED_PATHS">
116
117
  <list>
117
- <option value="$PROJECT_DIR$/lib/pg_cache_key.rb" />
118
118
  <option value="$PROJECT_DIR$/.gitignore" />
119
- <option value="$PROJECT_DIR$/README.md" />
120
119
  <option value="$PROJECT_DIR$/pg_cache_key.gemspec" />
120
+ <option value="$PROJECT_DIR$/README.md" />
121
+ <option value="$PROJECT_DIR$/lib/pg_cache_key/version.rb" />
122
+ <option value="$PROJECT_DIR$/lib/pg_cache_key.rb" />
121
123
  </list>
122
124
  </option>
123
125
  </component>
@@ -130,9 +132,9 @@
130
132
  </component>
131
133
  <component name="ProjectFrameBounds">
132
134
  <option name="x" value="65" />
133
- <option name="y" value="24" />
135
+ <option name="y" value="-4" />
134
136
  <option name="width" value="1855" />
135
- <option name="height" value="1056" />
137
+ <option name="height" value="1084" />
136
138
  </component>
137
139
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
138
140
  <OptionsSetting value="true" id="Add" />
@@ -157,6 +159,8 @@
157
159
  <sortByType />
158
160
  </navigator>
159
161
  <panes>
162
+ <pane id="Scratches" />
163
+ <pane id="Scope" />
160
164
  <pane id="ProjectPane">
161
165
  <subPane>
162
166
  <PATH>
@@ -207,10 +211,22 @@
207
211
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
208
212
  </PATH_ELEMENT>
209
213
  </PATH>
214
+ <PATH>
215
+ <PATH_ELEMENT>
216
+ <option name="myItemId" value="pg_cache_key" />
217
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
218
+ </PATH_ELEMENT>
219
+ <PATH_ELEMENT>
220
+ <option name="myItemId" value="pg_cache_key" />
221
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
222
+ </PATH_ELEMENT>
223
+ <PATH_ELEMENT>
224
+ <option name="myItemId" value="bin" />
225
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
226
+ </PATH_ELEMENT>
227
+ </PATH>
210
228
  </subPane>
211
229
  </pane>
212
- <pane id="Scratches" />
213
- <pane id="Scope" />
214
230
  </panes>
215
231
  </component>
216
232
  <component name="PropertiesComponent">
@@ -256,6 +272,12 @@
256
272
  <method />
257
273
  </configuration>
258
274
  <configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
275
+ <node-options />
276
+ <gulpfile />
277
+ <tasks />
278
+ <arguments />
279
+ <pass-parent-envs>true</pass-parent-envs>
280
+ <envs />
259
281
  <method />
260
282
  </configuration>
261
283
  </component>
@@ -288,49 +310,87 @@
288
310
  <option name="project" value="LOCAL" />
289
311
  <updated>1474284631160</updated>
290
312
  </task>
291
- <option name="localTasksCounter" value="4" />
313
+ <task id="LOCAL-00004" summary="forgot home page">
314
+ <created>1474284706360</created>
315
+ <option name="number" value="00004" />
316
+ <option name="project" value="LOCAL" />
317
+ <updated>1474284706360</updated>
318
+ </task>
319
+ <task id="LOCAL-00005" summary="added link to early mentioned solution">
320
+ <created>1474285238850</created>
321
+ <option name="number" value="00005" />
322
+ <option name="project" value="LOCAL" />
323
+ <updated>1474285238850</updated>
324
+ </task>
325
+ <option name="localTasksCounter" value="6" />
292
326
  <servers />
293
327
  </component>
294
328
  <component name="ToolWindowManager">
295
- <frame x="65" y="24" width="1855" height="1056" extended-state="6" />
329
+ <frame x="65" y="-4" width="1855" height="1084" extended-state="6" />
296
330
  <editor active="true" />
297
331
  <layout>
298
332
  <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.20066334" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
299
333
  <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3294979" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
300
- <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32881" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
334
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32881" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
301
335
  <window_info id="Event Log" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.35102266" sideWeight="0.5002764" order="4" side_tool="false" content_ui="tabs" />
302
336
  <window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
303
337
  <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32946378" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
304
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.38830897" sideWeight="0.4997236" order="3" side_tool="false" content_ui="tabs" />
305
338
  <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3966597" sideWeight="0.4997236" order="10" side_tool="false" content_ui="tabs" />
306
339
  <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2498618" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
307
340
  <window_info id="Terminal" active="false" anchor="bottom" auto_hide="true" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3810021" sideWeight="0.4997236" order="11" side_tool="false" content_ui="tabs" />
308
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.45093945" sideWeight="0.4997236" order="12" side_tool="false" content_ui="tabs" />
309
341
  <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
310
342
  <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3294979" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
311
343
  <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
312
344
  <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
313
345
  <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
314
346
  <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
347
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.38830897" sideWeight="0.4997236" order="3" side_tool="false" content_ui="tabs" />
315
348
  <window_info id="Thumbnails" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3294979" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
316
349
  <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2498618" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
317
350
  <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.41336116" sideWeight="0.78275293" order="2" side_tool="false" content_ui="tabs" />
318
351
  <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
352
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.45093945" sideWeight="0.4997236" order="12" side_tool="false" content_ui="tabs" />
319
353
  </layout>
320
354
  </component>
355
+ <component name="Vcs.Log.UiProperties">
356
+ <option name="RECENTLY_FILTERED_USER_GROUPS">
357
+ <collection />
358
+ </option>
359
+ <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
360
+ <collection />
361
+ </option>
362
+ </component>
321
363
  <component name="VcsContentAnnotationSettings">
322
364
  <option name="myLimit" value="2678400000" />
323
365
  </component>
324
366
  <component name="VcsManagerConfiguration">
325
367
  <MESSAGE value="initial commit" />
326
368
  <MESSAGE value="rubygems forgot" />
327
- <option name="LAST_COMMIT_MESSAGE" value="rubygems forgot" />
369
+ <MESSAGE value="forgot home page" />
370
+ <MESSAGE value="added link to early mentioned solution" />
371
+ <option name="LAST_COMMIT_MESSAGE" value="added link to early mentioned solution" />
328
372
  </component>
329
373
  <component name="XDebuggerManager">
330
374
  <breakpoint-manager />
331
375
  <watches-manager />
332
376
  </component>
333
377
  <component name="editorHistoryManager">
378
+ <entry file="file://$PROJECT_DIR$/lib/pg_cache_key.rb">
379
+ <provider selected="true" editor-type-id="text-editor">
380
+ <state vertical-scroll-proportion="0.0">
381
+ <caret line="18" column="155" selection-start-line="18" selection-start-column="155" selection-end-line="18" selection-end-column="155" />
382
+ <folding />
383
+ </state>
384
+ </provider>
385
+ </entry>
386
+ <entry file="file://$PROJECT_DIR$/lib/pg_cache_key/version.rb">
387
+ <provider selected="true" editor-type-id="text-editor">
388
+ <state vertical-scroll-proportion="0.0">
389
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
390
+ <folding />
391
+ </state>
392
+ </provider>
393
+ </entry>
334
394
  <entry file="file://$PROJECT_DIR$/Gemfile">
335
395
  <provider selected="true" editor-type-id="text-editor">
336
396
  <state vertical-scroll-proportion="0.0">
@@ -347,7 +407,29 @@
347
407
  </state>
348
408
  </provider>
349
409
  </entry>
350
- <entry file="file://$PROJECT_DIR$/lib/pg_cache_key/version.rb">
410
+ <entry file="file://$PROJECT_DIR$/pg_cache_key.gemspec">
411
+ <provider selected="true" editor-type-id="text-editor">
412
+ <state vertical-scroll-proportion="0.0">
413
+ <caret line="3" column="21" selection-start-line="3" selection-start-column="9" selection-end-line="3" selection-end-column="21" />
414
+ <folding />
415
+ </state>
416
+ </provider>
417
+ </entry>
418
+ <entry file="file://$PROJECT_DIR$/README.md">
419
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
420
+ <state />
421
+ </provider>
422
+ <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
423
+ <state split_layout="FIRST">
424
+ <first_editor vertical-scroll-proportion="0.0">
425
+ <caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
426
+ <folding />
427
+ </first_editor>
428
+ <second_editor />
429
+ </state>
430
+ </provider>
431
+ </entry>
432
+ <entry file="file://$PROJECT_DIR$/.gitignore">
351
433
  <provider selected="true" editor-type-id="text-editor">
352
434
  <state vertical-scroll-proportion="0.0">
353
435
  <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
@@ -355,40 +437,64 @@
355
437
  </state>
356
438
  </provider>
357
439
  </entry>
358
- <entry file="file://$PROJECT_DIR$/lib/pg_cache_key.rb">
440
+ <entry file="file://$PROJECT_DIR$/Gemfile">
359
441
  <provider selected="true" editor-type-id="text-editor">
360
442
  <state vertical-scroll-proportion="0.0">
361
- <caret line="18" column="155" selection-start-line="18" selection-start-column="155" selection-end-line="18" selection-end-column="155" />
443
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
362
444
  <folding />
363
445
  </state>
364
446
  </provider>
365
447
  </entry>
366
- <entry file="file://$PROJECT_DIR$/.gitignore">
448
+ <entry file="file://$PROJECT_DIR$/Rakefile">
367
449
  <provider selected="true" editor-type-id="text-editor">
368
450
  <state vertical-scroll-proportion="0.0">
369
- <caret line="0" column="7" selection-start-line="0" selection-start-column="7" selection-end-line="0" selection-end-column="7" />
451
+ <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
452
+ <folding />
453
+ </state>
454
+ </provider>
455
+ </entry>
456
+ <entry file="file://$PROJECT_DIR$/pg_cache_key.gemspec">
457
+ <provider selected="true" editor-type-id="text-editor">
458
+ <state vertical-scroll-proportion="0.0">
459
+ <caret line="3" column="21" selection-start-line="3" selection-start-column="9" selection-end-line="3" selection-end-column="21" />
370
460
  <folding />
371
461
  </state>
372
462
  </provider>
373
463
  </entry>
374
464
  <entry file="file://$PROJECT_DIR$/README.md">
465
+ <provider editor-type-id="MultiMarkdownFxPreviewEditor">
466
+ <state />
467
+ </provider>
375
468
  <provider selected="true" editor-type-id="split-provider[text-editor;MultiMarkdownPreviewEditor]">
376
469
  <state split_layout="FIRST">
377
- <first_editor vertical-scroll-proportion="0.31802526">
378
- <caret line="38" column="0" selection-start-line="38" selection-start-column="0" selection-end-line="38" selection-end-column="0" />
470
+ <first_editor vertical-scroll-proportion="0.0">
471
+ <caret line="11" column="0" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
379
472
  <folding />
380
473
  </first_editor>
381
474
  <second_editor />
382
475
  </state>
383
476
  </provider>
384
- <provider editor-type-id="MultiMarkdownFxPreviewEditor">
385
- <state />
477
+ </entry>
478
+ <entry file="file://$PROJECT_DIR$/.gitignore">
479
+ <provider selected="true" editor-type-id="text-editor">
480
+ <state vertical-scroll-proportion="0.0">
481
+ <caret line="0" column="7" selection-start-line="0" selection-start-column="7" selection-end-line="0" selection-end-column="7" />
482
+ <folding />
483
+ </state>
386
484
  </provider>
387
485
  </entry>
388
- <entry file="file://$PROJECT_DIR$/pg_cache_key.gemspec">
486
+ <entry file="file://$PROJECT_DIR$/lib/pg_cache_key/version.rb">
487
+ <provider selected="true" editor-type-id="text-editor">
488
+ <state vertical-scroll-proportion="0.0">
489
+ <caret line="1" column="18" selection-start-line="1" selection-start-column="18" selection-end-line="1" selection-end-column="18" />
490
+ <folding />
491
+ </state>
492
+ </provider>
493
+ </entry>
494
+ <entry file="file://$PROJECT_DIR$/lib/pg_cache_key.rb">
389
495
  <provider selected="true" editor-type-id="text-editor">
390
- <state vertical-scroll-proportion="0.25215518">
391
- <caret line="13" column="64" selection-start-line="13" selection-start-column="64" selection-end-line="13" selection-end-column="64" />
496
+ <state vertical-scroll-proportion="0.64600325">
497
+ <caret line="25" column="34" selection-start-line="25" selection-start-column="34" selection-end-line="25" selection-end-column="34" />
392
498
  <folding />
393
499
  </state>
394
500
  </provider>
data/README.md CHANGED
@@ -1,18 +1,35 @@
1
- # PgCacheKey
2
- Attention! This gem intend to use only with PostrgreSQL, so it will not work other ways, BUT if your database have some
1
+ #Attention!
2
+
3
+ This gem intend to use only with PostrgreSQL >= 9.1, so it will not work other ways, BUT if your database have some
3
4
  aggregation function you can get idea and create your own version of it.
4
5
 
6
+ # Внимашка (рус)
7
+
8
+ Данный gem работает только с PostrgreSQL >= 9.1, НО если у вас есть потребность в аналоге для другой БД вы
9
+ легко можете, скопировав код, поменять все что нужно.
10
+
11
+ # PgCacheKey
5
12
  Simple replace for cache_key for collections to make it very fast.
6
- It's optimizing code near fragment_cache_key, replacing collection instatination with DB aggregation.
13
+ It's optimizing code near fragment_cache_key, replacing collection and it's includes instatination with DB aggregation.
7
14
 
8
15
  It respects all aspects of collection properties including order, limits, offsets and so.
9
16
 
10
17
  Also comparing to rails 5 solution for collection cache key this one will not need to throw away all sub-collection caches
11
- when any elements of the whole collection updates.
18
+ when any elements of the table updates.
19
+
20
+ Rem: I mention my solution in https://github.com/rails/rails/issues/26330
12
21
 
22
+ # PgCacheKey (рус)
23
+
24
+ Назначение данного gem'а - ускорение генрации ключей кеша коллекций путем переноса генерации на плечи БД, что экономит на инстантинации коллекции и всех ее зависимостей. Особенно выгодно может быть использование в рельсах до 4.2 включительно, потому что в 4-х рельсах для генерации ключей коллекции она превращается в массив, т.е. инстанцируется, включая все связные коллекции.
25
+
26
+ PgCacheKey зависит только от подмножества используемых записей и их порядка, поэтому в отличие от collection_cache_key в 5-х
27
+ рельсах кеши всех подколлекций не летят в топку при изменении одного элемента в таблице.
28
+
29
+ Rem: Данное решение было упомянуто мной в https://github.com/rails/rails/issues/26330
13
30
 
14
31
  # Benchmark
15
- the numbers I personaly get while comparing with rails 4.2 implementation of cache_key are:
32
+ the numbers I personally get while comparing with rails 4.2 implementation of cache_key are:
16
33
 
17
34
  Complex model
18
35
  without includes: 10 items in collection ~ x1.3 faster, 20 ~ 1.55, 50 ~ x2, 1000 ~ x15
@@ -27,7 +44,9 @@ with includes: 10 items in collection ~ x3.6 faster, 20 ~ x4, 50 ~ x5.6, 1000 ~
27
44
 
28
45
  Of course this is not the numbers for whole page rendering, but it's noticeable.
29
46
 
30
- Try it yourself.
47
+ One of my real page goes from 0.8+ sec, for largest available pagination, to 0.6 sec per page
48
+
49
+ To get your numbers try it yourself!
31
50
 
32
51
  ## Installation
33
52
 
@@ -46,8 +65,11 @@ Or install it yourself as:
46
65
  $ gem install pg_cache_key
47
66
 
48
67
  ## Usage
68
+ It works out of the box.
69
+
70
+ ## Как использовать
49
71
 
50
- It works out of the box for system uses pg.
72
+ По идее работает само из коробки, но если будут траблы - пишите.
51
73
 
52
74
  ## Development
53
75
 
@@ -1,3 +1,3 @@
1
1
  module PgCacheKey
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/lib/pg_cache_key.rb CHANGED
@@ -1,23 +1,32 @@
1
1
  require "pg_cache_key/version"
2
2
 
3
+ # In rails 5 it can be
3
4
  # module ActiveRecord
4
5
  # module CollectionCacheKey
5
6
  # def collection_cache_key(collection = all, timestamp_column = :updated_at) # :nodoc:
6
7
  # # why use connection.execute instead of doing collection.select because of an order. if you using some order on your scope
7
8
  # # then columns you using to order must appear in the GROUP BY clause or be used in an aggregate function or you will get an error
8
- # connection.execute( "SELECT md5(string_agg( #{[timestamp_column, :id].map{|fld| "\"t\".\"#{fld}\"::text" }.join('||')}, '') ) as cache_key
9
- # FROM (#{ collection.try(:to_sql) }) t" )[0]['cache_key']
9
+ # cache_columns = [timestamp_column, :id]
10
+ # @cache_keys ||= {}
11
+ # # we need to add select cache_columns explicitly because if relation has includes it might transform columns to aliases
12
+ # @cache_keys[timestamp_column] ||= connection.execute( "SELECT md5(string_agg( #{cache_columns.map{|fld| "\"t\".\"#{fld}\"::text" }.join('||')}, '') ) as cache_key
13
+ # FROM (#{ collection.select(cache_columns).try(:to_sql) }) t" )[0]['cache_key']
10
14
  # end
11
15
  # end
12
16
  # end
13
17
 
18
+ # in rails 4 it would go like this:
14
19
  module ActiveRecord
15
20
  # = Active Record \Relation
16
21
  class Relation
17
22
  def cache_key(timestamp_column = :updated_at)
23
+ cache_columns = [timestamp_column, :id]
18
24
  @cache_keys ||= {}
19
- @cache_keys[timestamp_column] ||= connection.execute( "SELECT md5(string_agg( #{[timestamp_column, :id].map{|fld| "\"t\".\"#{fld}\"::text" }.join('||')}, '') ) as cache_key
20
- FROM (#{ try(:to_sql) }) t" )[0]['cache_key']
25
+ # why use connection.execute instead of doing collection.select because of an order. if you using some order on your scope
26
+ # then columns you using to order must appear in the GROUP BY clause or be used in an aggregate function or you will get an error
27
+ # we need to add select cache_columns explicitly because if relation has includes it might transform columns to aliases
28
+ @cache_keys[timestamp_column] ||= connection.execute( "SELECT md5(string_agg( #{cache_columns.map{|fld| "\"t\".\"#{fld}\"::text" }.join('||')}, '') ) as cache_key
29
+ FROM (#{ select(cache_columns).try(:to_sql) }) t" )[0]['cache_key']
21
30
  end
22
31
  end
23
- end
32
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_cache_key
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-19 00:00:00.000000000 Z
11
+ date: 2016-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord