incrdecr_cached_counts 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.rdoc +7 -5
  4. data/lib/cached_counts/version.rb +1 -1
  5. metadata +2 -51
  6. data/html/CachedCounts/ClassMethods.html +0 -960
  7. data/html/CachedCounts/Railtie.html +0 -102
  8. data/html/CachedCounts.html +0 -197
  9. data/html/README_rdoc.html +0 -152
  10. data/html/created.rid +0 -7
  11. data/html/css/fonts.css +0 -167
  12. data/html/css/rdoc.css +0 -590
  13. data/html/fonts/Lato-Light.ttf +0 -0
  14. data/html/fonts/Lato-LightItalic.ttf +0 -0
  15. data/html/fonts/Lato-Regular.ttf +0 -0
  16. data/html/fonts/Lato-RegularItalic.ttf +0 -0
  17. data/html/fonts/SourceCodePro-Bold.ttf +0 -0
  18. data/html/fonts/SourceCodePro-Regular.ttf +0 -0
  19. data/html/images/add.png +0 -0
  20. data/html/images/arrow_up.png +0 -0
  21. data/html/images/brick.png +0 -0
  22. data/html/images/brick_link.png +0 -0
  23. data/html/images/bug.png +0 -0
  24. data/html/images/bullet_black.png +0 -0
  25. data/html/images/bullet_toggle_minus.png +0 -0
  26. data/html/images/bullet_toggle_plus.png +0 -0
  27. data/html/images/date.png +0 -0
  28. data/html/images/delete.png +0 -0
  29. data/html/images/find.png +0 -0
  30. data/html/images/loadingAnimation.gif +0 -0
  31. data/html/images/macFFBgHack.png +0 -0
  32. data/html/images/package.png +0 -0
  33. data/html/images/page_green.png +0 -0
  34. data/html/images/page_white_text.png +0 -0
  35. data/html/images/page_white_width.png +0 -0
  36. data/html/images/plugin.png +0 -0
  37. data/html/images/ruby.png +0 -0
  38. data/html/images/tag_blue.png +0 -0
  39. data/html/images/tag_green.png +0 -0
  40. data/html/images/transparent.png +0 -0
  41. data/html/images/wrench.png +0 -0
  42. data/html/images/wrench_orange.png +0 -0
  43. data/html/images/zoom.png +0 -0
  44. data/html/index.html +0 -155
  45. data/html/js/darkfish.js +0 -161
  46. data/html/js/jquery.js +0 -4
  47. data/html/js/navigation.js +0 -142
  48. data/html/js/navigation.js.gz +0 -0
  49. data/html/js/search.js +0 -109
  50. data/html/js/search_index.js +0 -1
  51. data/html/js/search_index.js.gz +0 -0
  52. data/html/js/searcher.js +0 -228
  53. data/html/js/searcher.js.gz +0 -0
  54. data/html/table_of_contents.html +0 -144
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ea050eb7e1f6d2a0602f70e955b55a84a203468
4
- data.tar.gz: 6150a6c504e7ff131ab5d228e3dd61b48225b39b
3
+ metadata.gz: 033e0da0b3b6191884b1ed3547029daf979e9af7
4
+ data.tar.gz: b3e5b4e46ac655f2ab54b6b59ce57544b0b11177
5
5
  SHA512:
6
- metadata.gz: 6741a345bd6731333ff5766af136da3f5ad059bd34e50586798804130484de3c24248a025bf396b86831cc48e5860d9f8a4697d8fd9d5a0f3ec7ff061d63f344
7
- data.tar.gz: b25da87c5368e38f0d6e167a38e2141789a3ef1c58aa528ad234b1008da25562e52b57111ef77302f66a9973258fdfe9e2ae95d116bf026da97e0d309149a857
6
+ metadata.gz: 7d0a1cf6c691aa0f41d86ab72743575d5eb906943eba00295681e033a69d39c2f5bc5d9ab0c0f1865bb387a82d6016ffe2f442844876f8c7bb3375ac11fb665e
7
+ data.tar.gz: 578b20bd19e73cd0df63d4fbbb99618f7bf7c343b85b049a9560be46ae8e493c746dc835710977440572fe792f6df72a1750fae61dd28fde207e8eaa4268ab65
data/.gitignore CHANGED
@@ -3,6 +3,7 @@ log/*.log
3
3
  Gemfile.lock
4
4
  incrdecr_cached_counts-*.gem
5
5
  pkg/
6
+ html/
6
7
  test/dummy/db/*.sqlite3
7
8
  test/dummy/db/*.sqlite3-journal
8
9
  test/dummy/log/*.log
data/README.rdoc CHANGED
@@ -8,14 +8,15 @@ cache up to date using incr/decr operations.
8
8
  You might prefer this gem over Rails' built-in counter caches when:
9
9
  * You want to cache the total number of models for a class or scope
10
10
  * You have a large association (e.g. followers of a popular figure) and want to avoid contention on a database row
11
- * You want your caches to expire and be refreshed to mitigate the risk of getting out of sync
11
+ * You want your caches to occasionally expire and be refreshed to mitigate the risk of getting out of sync
12
12
  * You don't need to use counts as part of more complex SQL queries
13
13
 
14
- There are [many alternatives](https://rubygems.org/search?utf8=%E2%9C%93&query=counter+cache),
15
- but this gem appears to be unique in making use of memcached's incr/decr operations.
14
+ There are {many alternatives}[https://rubygems.org/search?utf8=%E2%9C%93&query=counter+cache], but this gem appears to be unique in its approach. Other gems solve the contention issue by pushing updates to a background job, which has the advantage of continuing to populate a column that can be queried via SQL, but is still more costly than our approach, while introducing a synchronization delay.
16
15
 
17
16
  = Usage
18
17
 
18
+ {Documentation}[http://academia-edu.github.io/cached_counts/]
19
+
19
20
  Basic usage:
20
21
 
21
22
  class User < ActiveRecord::Base
@@ -37,8 +38,9 @@ Basic usage:
37
38
  belongs_to :followee, class_name: 'User', # ...
38
39
  end
39
40
 
40
- For full options, see docs for CachedCounts.caches_count_of
41
- and CachedCounts.caches_count_where.
41
+ Note that _CachedCounts_ must be included in the counted class, but no class methods need be called there.
42
+
43
+ For full options, see docs for _CachedCounts.caches_count_of_ and _CachedCounts.caches_count_where_.
42
44
 
43
45
  = Licence
44
46
 
@@ -1,3 +1,3 @@
1
1
  module CachedCounts
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incrdecr_cached_counts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Judd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-08 00:00:00.000000000 Z
11
+ date: 2016-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -138,55 +138,6 @@ files:
138
138
  - README.rdoc
139
139
  - Rakefile
140
140
  - circle.yml
141
- - html/CachedCounts.html
142
- - html/CachedCounts/ClassMethods.html
143
- - html/CachedCounts/Railtie.html
144
- - html/README_rdoc.html
145
- - html/created.rid
146
- - html/css/fonts.css
147
- - html/css/rdoc.css
148
- - html/fonts/Lato-Light.ttf
149
- - html/fonts/Lato-LightItalic.ttf
150
- - html/fonts/Lato-Regular.ttf
151
- - html/fonts/Lato-RegularItalic.ttf
152
- - html/fonts/SourceCodePro-Bold.ttf
153
- - html/fonts/SourceCodePro-Regular.ttf
154
- - html/images/add.png
155
- - html/images/arrow_up.png
156
- - html/images/brick.png
157
- - html/images/brick_link.png
158
- - html/images/bug.png
159
- - html/images/bullet_black.png
160
- - html/images/bullet_toggle_minus.png
161
- - html/images/bullet_toggle_plus.png
162
- - html/images/date.png
163
- - html/images/delete.png
164
- - html/images/find.png
165
- - html/images/loadingAnimation.gif
166
- - html/images/macFFBgHack.png
167
- - html/images/package.png
168
- - html/images/page_green.png
169
- - html/images/page_white_text.png
170
- - html/images/page_white_width.png
171
- - html/images/plugin.png
172
- - html/images/ruby.png
173
- - html/images/tag_blue.png
174
- - html/images/tag_green.png
175
- - html/images/transparent.png
176
- - html/images/wrench.png
177
- - html/images/wrench_orange.png
178
- - html/images/zoom.png
179
- - html/index.html
180
- - html/js/darkfish.js
181
- - html/js/jquery.js
182
- - html/js/navigation.js
183
- - html/js/navigation.js.gz
184
- - html/js/search.js
185
- - html/js/search_index.js
186
- - html/js/search_index.js.gz
187
- - html/js/searcher.js
188
- - html/js/searcher.js.gz
189
- - html/table_of_contents.html
190
141
  - incrdecr_cached_counts.gemspec
191
142
  - lib/cached_counts.rb
192
143
  - lib/cached_counts/connection_for.rb