redvex-ar_cache 0.1.0 → 0.1.1

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.
data/README.rdoc CHANGED
@@ -17,7 +17,11 @@ If you use this software, please make a donation[https://www.paypal.com/cgi-bin/
17
17
 
18
18
  ==Installation
19
19
  * gem sources -a http://gems.github.com
20
- * gem install ar_cache
20
+ * gem install redvex-ar_cache
21
+
22
+ Add in your config/enviroment.rb
23
+
24
+ config.gem "redvex-ar_cache", :lib => 'ar_cache', :source => 'http://gems.github.com'
21
25
 
22
26
  ==Use ActiveRecord Cache
23
27
 
@@ -52,8 +56,8 @@ If you want to reset cache after predetermined amount of time you can specify ti
52
56
 
53
57
  If you want to force the expire the cache manually you can call the method
54
58
 
55
- * cache_reset!(id, params=nil)
59
+ * cache_reset(id, params=nil)
56
60
  or shortcuts
57
- * cache_reset_first!(params=nil)
58
- * cache_reset_last!(params=nil)
59
- * cache_reset_all!(params=nil)
61
+ * cache_reset_first(params=nil)
62
+ * cache_reset_last(params=nil)
63
+ * cache_reset_all(params=nil)
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('ar_cache', '0.1.0') do |p|
5
+ Echoe.new('ar_cache', '0.1.1') do |p|
6
6
  p.description = "Performe ActiveRecord cache in File System for heavy and repetitive query."
7
7
  p.url = "http://github.com/redvex/ar_cache"
8
8
  p.author = "Gianni Mazza"
data/ar_cache.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ar_cache}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Gianni Mazza"]
data/lib/ar_cache.rb CHANGED
@@ -32,7 +32,7 @@ module ArCache
32
32
 
33
33
  filename = calculate_file_name(id, params)
34
34
  if cache_reset?(filename)
35
- cache_reset!(id, params)
35
+ cache_reset(id, params)
36
36
  end
37
37
 
38
38
  if File.exist?(filename)
@@ -70,19 +70,19 @@ module ArCache
70
70
  return cache_find(:all, params)
71
71
  end
72
72
 
73
- def cache_reset_first!(params=nil)
73
+ def cache_reset_first(params=nil)
74
74
  return cache_reset(:first, params)
75
75
  end
76
76
 
77
- def cache_reset_last!(params=nil)
77
+ def cache_reset_last(params=nil)
78
78
  return cache_reset(:last, params)
79
79
  end
80
80
 
81
- def cache_reset_all!(params=nil)
81
+ def cache_reset_all(params=nil)
82
82
  return cache_reset(:all, params)
83
83
  end
84
84
 
85
- def cache_reset!(id, params=nil)
85
+ def cache_reset(id, params=nil)
86
86
  filename = calculate_file_name(id, params)
87
87
  File.delete(filename)
88
88
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redvex-ar_cache
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
  - Gianni Mazza