cachetastic 1.5.0 → 1.6.0
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/doc/classes/ActiveRecord/Base.html +188 -0
- data/doc/classes/CGI/Session/CachetasticStore.html +124 -0
- data/doc/classes/Cachetastic/Adapters/Base.html +331 -0
- data/doc/classes/Cachetastic/Adapters/Drb.html +332 -0
- data/doc/classes/Cachetastic/Adapters/File.html +248 -0
- data/doc/classes/Cachetastic/Adapters/FileBase.html +309 -0
- data/doc/classes/Cachetastic/Adapters/HtmlFile.html +224 -0
- data/doc/classes/Cachetastic/Adapters/LocalMemory.html +346 -0
- data/doc/classes/Cachetastic/Adapters/Memcache.html +498 -0
- data/doc/classes/Cachetastic/Cacheable.html +264 -0
- data/doc/classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html +287 -0
- data/doc/classes/Cachetastic/Cacheable/ClassOnlyMethods.html +200 -0
- data/doc/classes/Cachetastic/Caches/Base.html +672 -0
- data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html +179 -0
- data/doc/classes/Cachetastic/Caches/MackSessionCache.html +119 -0
- data/doc/classes/Cachetastic/Caches/PageCache.html +121 -0
- data/doc/classes/Cachetastic/Caches/RailsSessionCache.html +154 -0
- data/doc/classes/Cachetastic/Connection.html +212 -0
- data/doc/classes/Cachetastic/Errors/UnsupportedAdapter.html +146 -0
- data/doc/classes/Cachetastic/Logger.html +189 -0
- data/doc/classes/Object.html +152 -0
- data/doc/created.rid +1 -0
- data/doc/files/README.html +207 -0
- data/doc/files/lib/adapters/cachetastic_adapters_base_rb.html +139 -0
- data/doc/files/lib/adapters/cachetastic_adapters_drb_rb.html +115 -0
- data/doc/files/lib/adapters/cachetastic_adapters_file_base_rb.html +109 -0
- data/doc/files/lib/adapters/cachetastic_adapters_file_rb.html +121 -0
- data/doc/files/lib/adapters/cachetastic_adapters_html_file_rb.html +137 -0
- data/doc/files/lib/adapters/cachetastic_adapters_local_memory_rb.html +109 -0
- data/doc/files/lib/adapters/cachetastic_adapters_memcache_rb.html +127 -0
- data/doc/files/lib/adapters/cachetastic_adapters_store_object_rb.html +101 -0
- data/doc/files/lib/caches/cachetastic_caches_base_rb.html +108 -0
- data/doc/files/lib/caches/cachetastic_caches_mack_session_cache_rb.html +107 -0
- data/doc/files/lib/caches/cachetastic_caches_page_cache_rb.html +109 -0
- data/doc/files/lib/caches/cachetastic_caches_rails_session_cache_rb.html +107 -0
- data/doc/files/lib/cachetastic_cacheable_rb.html +101 -0
- data/doc/files/lib/cachetastic_connection_rb.html +107 -0
- data/doc/files/lib/cachetastic_logger_rb.html +107 -0
- data/doc/files/lib/cachetastic_rb.html +222 -0
- data/doc/files/lib/errors/cachetastic_errors_unsupported_adapter_rb.html +101 -0
- data/doc/files/lib/rails_extensions/cachetastic_active_record_base_rb.html +101 -0
- data/doc/files/lib/rails_extensions/cgi_session_cachetastic_store_rb.html +109 -0
- data/doc/files/lib/ruby_extensions/object_rb.html +101 -0
- data/doc/fr_class_index.html +47 -0
- data/doc/fr_file_index.html +47 -0
- data/doc/fr_method_index.html +100 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/cachetastic.rb +21 -23
- data/lib/cachetastic_cacheable.rb +202 -0
- data/lib/rails_extensions/cachetastic_active_record_base.rb +12 -39
- data/lib/ruby_extensions/object.rb +8 -0
- data/test/active_record_test.rb +8 -8
- data/test/cacheable_test.rb +72 -0
- metadata +52 -2
- data/lib/helpers/cachetastic_helpers_active_record.rb +0 -46
data/lib/cachetastic.rb
CHANGED
@@ -19,39 +19,37 @@ end
|
|
19
19
|
|
20
20
|
module Cachetastic #:nodoc:#
|
21
21
|
module Caches #:nodoc:#
|
22
|
-
module ActiveRecord #:nodoc:#
|
23
|
-
end
|
24
22
|
end
|
25
23
|
module Adapters #:nodoc:#
|
26
24
|
end
|
27
25
|
module Errors #:nodoc:#
|
28
26
|
end
|
29
|
-
module
|
30
|
-
module ActiveRecord #:nodoc:#
|
31
|
-
end
|
27
|
+
module Cacheable
|
32
28
|
end
|
33
29
|
end
|
34
30
|
module ActiveRecord #:nodoc:#
|
35
31
|
end
|
36
32
|
|
37
|
-
|
38
|
-
|
39
|
-
require '
|
40
|
-
require '
|
41
|
-
require 'caches/
|
42
|
-
require 'caches/
|
43
|
-
require '
|
44
|
-
require '
|
45
|
-
require '
|
46
|
-
require 'adapters/
|
47
|
-
require 'adapters/
|
48
|
-
require 'adapters/
|
49
|
-
require 'adapters/
|
50
|
-
require 'adapters/
|
51
|
-
require 'adapters/
|
52
|
-
require '
|
53
|
-
require '
|
54
|
-
require '
|
33
|
+
home = File.dirname(__FILE__)
|
34
|
+
|
35
|
+
require File.join(home, 'cachetastic_connection')
|
36
|
+
require File.join(home, 'cachetastic_logger')
|
37
|
+
require File.join(home, 'caches/cachetastic_caches_base')
|
38
|
+
require File.join(home, 'caches/cachetastic_caches_page_cache')
|
39
|
+
require File.join(home, 'caches/cachetastic_caches_rails_session_cache')
|
40
|
+
require File.join(home, 'caches/cachetastic_caches_mack_session_cache')
|
41
|
+
require File.join(home, 'errors/cachetastic_errors_unsupported_adapter')
|
42
|
+
require File.join(home, 'adapters/cachetastic_adapters_base')
|
43
|
+
require File.join(home, 'adapters/cachetastic_adapters_store_object')
|
44
|
+
require File.join(home, 'adapters/cachetastic_adapters_memcache')
|
45
|
+
require File.join(home, 'adapters/cachetastic_adapters_local_memory')
|
46
|
+
require File.join(home, 'adapters/cachetastic_adapters_file_base')
|
47
|
+
require File.join(home, 'adapters/cachetastic_adapters_file')
|
48
|
+
require File.join(home, 'adapters/cachetastic_adapters_html_file')
|
49
|
+
require File.join(home, 'adapters/cachetastic_adapters_drb')
|
50
|
+
require File.join(home, 'cachetastic_cacheable')
|
51
|
+
require File.join(home, 'rails_extensions/cachetastic_active_record_base')
|
52
|
+
require File.join(home, 'rails_extensions/cgi_session_cachetastic_store')
|
55
53
|
|
56
54
|
#--
|
57
55
|
# http://rdoc.sourceforge.net/doc/index.html
|
@@ -0,0 +1,202 @@
|
|
1
|
+
module Cachetastic
|
2
|
+
# Include this module into an Object to achieve simplistic Object level caching.
|
3
|
+
# When including this module you *MUST* create an instance level method called cachetastic_key and
|
4
|
+
# have it return a valid key! If you return nil from the cachetastic_key method you will not be
|
5
|
+
# able to use the cache_self and uncache_self methods.
|
6
|
+
#
|
7
|
+
# Example:
|
8
|
+
# class Person
|
9
|
+
# include Cachetastic::Cacheable
|
10
|
+
#
|
11
|
+
# attr_accessor :name
|
12
|
+
#
|
13
|
+
# def cachetastic_key
|
14
|
+
# self.name
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
# def always_the_same(x, y)
|
18
|
+
# cacher("always_the_same") do
|
19
|
+
# x + y
|
20
|
+
# end
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# end
|
24
|
+
module Cacheable
|
25
|
+
|
26
|
+
module ClassAndInstanceMethods
|
27
|
+
# Returns the Cachetastic::Caches::Base object associated with the object.
|
28
|
+
# If a cache hasn't been defined the one will be created on the fly.
|
29
|
+
# The cache for the object is expected to be defined as:
|
30
|
+
# Cachetastic::Cacheable::{CLASS_NAME_HERE}Cache
|
31
|
+
#
|
32
|
+
# Example:
|
33
|
+
# class Person
|
34
|
+
# include Cachetastic::Cacheable
|
35
|
+
# attr_accessor :name
|
36
|
+
# def cachetastic_key
|
37
|
+
# self.name
|
38
|
+
# end
|
39
|
+
# end
|
40
|
+
#
|
41
|
+
# Person.cache_class # => Cachetastic::Cacheable::PersonCache
|
42
|
+
def cache_class
|
43
|
+
n = self.class.name
|
44
|
+
n = self.name if n == "Class"
|
45
|
+
# puts "n: #{n}"
|
46
|
+
c_name = "Cachetastic::Cacheable::#{n}Cache"
|
47
|
+
unless Cachetastic::Cacheable.const_defined?("#{n}Cache")
|
48
|
+
# puts "we need to create a cache for: #{c_name}"
|
49
|
+
eval %{
|
50
|
+
class #{c_name} < Cachetastic::Caches::Base
|
51
|
+
end
|
52
|
+
}
|
53
|
+
end
|
54
|
+
c_name.constantize
|
55
|
+
end
|
56
|
+
|
57
|
+
# How much did I want to call this method cache?? It originally was that, but
|
58
|
+
# in Rails 2.0 they decided to use that name, so I had to rename this method.
|
59
|
+
# This method will attempt to get an object from the cache for a given key.
|
60
|
+
# If the object is nil and a block is given the block will be run, and the results
|
61
|
+
# of the block will be automatically cached.
|
62
|
+
#
|
63
|
+
# Example:
|
64
|
+
# class Person
|
65
|
+
# include Cachetastic::Cacheable
|
66
|
+
# attr_accessor :name
|
67
|
+
# def cachetastic_key
|
68
|
+
# self.name
|
69
|
+
# end
|
70
|
+
# def always_the_same(x,y)
|
71
|
+
# cacher("always_the_same") do
|
72
|
+
# x + y
|
73
|
+
# end
|
74
|
+
# end
|
75
|
+
# end
|
76
|
+
#
|
77
|
+
# Person.new.always_the_same(1,2) # => 3
|
78
|
+
# Person.new.always_the_same(2,2) # => 3
|
79
|
+
# Person.new.always_the_same(3,3) # => 3
|
80
|
+
# Person.cacher("always_the_same") # => 3
|
81
|
+
# Person.get_from_cache("always_the_same") # => 3
|
82
|
+
# Cachetastic::Cacheable::PersonCache.get("always_the_same") # => 3
|
83
|
+
#
|
84
|
+
# Person.cacher("say_hi") {"Hi There"} # => "Hi There"
|
85
|
+
# Person.get_from_cache("say_hi") # => "Hi There"
|
86
|
+
# Cachetastic::Cacheable::PersonCache.get("say_hi") # => "Hi There"
|
87
|
+
def cacher(key, expiry = 0)
|
88
|
+
cache_class.get(key) do
|
89
|
+
if block_given?
|
90
|
+
res = yield
|
91
|
+
cache_class.set(key, res, expiry)
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
# Expires the entire cache associated with this objects's cache.
|
97
|
+
#
|
98
|
+
# Example:
|
99
|
+
# class Person
|
100
|
+
# include Cachetastic::Cacheable
|
101
|
+
# attr_accessor :name
|
102
|
+
# def cachetastic_key
|
103
|
+
# self.name
|
104
|
+
# end
|
105
|
+
# end
|
106
|
+
#
|
107
|
+
# Person.set_into_cache(1, "one")
|
108
|
+
# Person.get_from_cache(1) # => "one"
|
109
|
+
# Person.expire_all
|
110
|
+
# Person.get_from_cache(1) # => nil
|
111
|
+
# Person.set_into_cache(1, "one")
|
112
|
+
# Person.get_from_cache(1) # => "one"
|
113
|
+
# Cachetastic::Cacheable::PersonCache.expire_all
|
114
|
+
# Person.get_from_cache(1) # => nil
|
115
|
+
def expire_all
|
116
|
+
cache_class.expire_all
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# --------------------------
|
121
|
+
# Instance only methods:
|
122
|
+
|
123
|
+
# Unless the object's cachetastic_key method returns nil this method will store
|
124
|
+
# the object in the cache using the object's cachetastic_key as the key.
|
125
|
+
# You *MUST* create an instance level method called cachetastic_key and
|
126
|
+
# have it return a valid key! If you return nil from the cachetastic_key method you will not be
|
127
|
+
# able to use the cache_self and uncache_self methods.
|
128
|
+
#
|
129
|
+
# Example:
|
130
|
+
# class Person
|
131
|
+
# include Cachetastic::Cacheable
|
132
|
+
# attr_accessor :name
|
133
|
+
# def cachetastic_key
|
134
|
+
# self.name
|
135
|
+
# end
|
136
|
+
# end
|
137
|
+
#
|
138
|
+
# Person.get_from_cache("Mark Bates") # => nil
|
139
|
+
# p = Person.new
|
140
|
+
# p.name = "Mark Bates"
|
141
|
+
# p.cache_self
|
142
|
+
# Person.get_from_cache("Mark Bates") # => "Mark Bates"
|
143
|
+
def cache_self
|
144
|
+
cache_class.set(self.cachetastic_key, self) unless self.cachetastic_key.nil?
|
145
|
+
end
|
146
|
+
|
147
|
+
# Unless the object's cachetastic_key method returns nil this method will delete
|
148
|
+
# the object in the cache using the object's cachetastic_key as the key.
|
149
|
+
# You *MUST* create an instance level method called cachetastic_key and
|
150
|
+
# have it return a valid key! If you return nil from the cachetastic_key method you will not be
|
151
|
+
# able to use the cache_self and uncache_self methods.
|
152
|
+
#
|
153
|
+
# Example:
|
154
|
+
# class Person
|
155
|
+
# include Cachetastic::Cacheable
|
156
|
+
# attr_accessor :name
|
157
|
+
# def cachetastic_key
|
158
|
+
# self.name
|
159
|
+
# end
|
160
|
+
# end
|
161
|
+
#
|
162
|
+
# Person.get_from_cache("Mark Bates") # => nil
|
163
|
+
# p = Person.new
|
164
|
+
# p.name = "Mark Bates"
|
165
|
+
# p.cache_self
|
166
|
+
# Person.get_from_cache("Mark Bates") # => "Mark Bates"
|
167
|
+
# p.uncache_self
|
168
|
+
# Person.get_from_cache("Mark Bates") # => nil
|
169
|
+
def uncache_self
|
170
|
+
cache_class.delete(self.cachetastic_key) unless self.cachetastic_key.nil?
|
171
|
+
end
|
172
|
+
|
173
|
+
# --------------------------
|
174
|
+
|
175
|
+
def self.included(klass) # :nodoc:
|
176
|
+
klass.send(:include, ClassAndInstanceMethods)
|
177
|
+
klass.extend(ClassOnlyMethods)
|
178
|
+
klass.extend(ClassAndInstanceMethods)
|
179
|
+
end
|
180
|
+
|
181
|
+
module ClassOnlyMethods
|
182
|
+
# Returns an object from the cache for a given key.
|
183
|
+
# If the object returned is nil and the self_populate parameter is true
|
184
|
+
# then the key will be used to try and find the object in the database,
|
185
|
+
# set the object into the cache, and then return the object.
|
186
|
+
def get_from_cache(key, &block)
|
187
|
+
cache_class.get(key, &block)
|
188
|
+
end
|
189
|
+
|
190
|
+
# Deletes an object from the cache for a given key.
|
191
|
+
def delete_from_cache(key)
|
192
|
+
cache_class.delete(key)
|
193
|
+
end
|
194
|
+
|
195
|
+
# Sets an object into the cache for a given key.
|
196
|
+
def set_into_cache(key, value, expiry = 0)
|
197
|
+
cache_class.set(key, value, expiry)
|
198
|
+
end
|
199
|
+
end # ClassMethods
|
200
|
+
|
201
|
+
end # Cacheable
|
202
|
+
end # Cachetastic
|
@@ -1,47 +1,20 @@
|
|
1
1
|
class ActiveRecord::Base
|
2
2
|
|
3
|
-
include Cachetastic::
|
3
|
+
include Cachetastic::Cacheable
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
# Returns an object from the cache for a given key.
|
9
|
-
# If the object returned is nil and the self_populate parameter is true
|
10
|
-
# then the key will be used to try and find the object in the database,
|
11
|
-
# set the object into the cache, and then return the object.
|
12
|
-
def get_from_cache(key, self_populate = false)
|
13
|
-
res = cache_class.get(key)
|
14
|
-
if res.nil? && self_populate
|
15
|
-
res = self.name.constantize.find(key)
|
16
|
-
unless res.nil?
|
17
|
-
res.cache_self
|
18
|
-
end
|
19
|
-
end
|
20
|
-
res
|
21
|
-
end
|
22
|
-
|
23
|
-
# Deletes an object from the cache for a given key.
|
24
|
-
def delete_from_cache(key)
|
25
|
-
cache_class.delete(key)
|
26
|
-
end
|
27
|
-
|
28
|
-
# Sets an object into the cache for a given key.
|
29
|
-
def set_into_cache(key, value, expiry = 0)
|
30
|
-
cache_class.set(key, value, expiry)
|
31
|
-
end
|
32
|
-
|
5
|
+
def cachetastic_key
|
6
|
+
self.id
|
33
7
|
end
|
34
8
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
cache_class.delete(self.id) unless self.new_record?
|
9
|
+
def self.get_from_cache(key, self_populate = false)
|
10
|
+
res = cache_class.get(key)
|
11
|
+
if res.nil? && self_populate
|
12
|
+
res = self.name.constantize.find(key)
|
13
|
+
unless res.nil?
|
14
|
+
res.cache_self
|
15
|
+
end
|
16
|
+
end
|
17
|
+
res
|
45
18
|
end
|
46
19
|
|
47
20
|
end
|
data/test/active_record_test.rb
CHANGED
@@ -37,20 +37,20 @@ class ActiveRecordTest < Test::Unit::TestCase
|
|
37
37
|
|
38
38
|
def test_extensions
|
39
39
|
album = ArAlbum.find(1)
|
40
|
-
assert !Cachetastic::
|
40
|
+
assert !Cachetastic::Cacheable.const_defined?("ArAlbumCache")
|
41
41
|
album.cache_self
|
42
|
-
assert Cachetastic::
|
43
|
-
assert_equal album, Cachetastic::
|
42
|
+
assert Cachetastic::Cacheable.const_defined?("ArAlbumCache")
|
43
|
+
assert_equal album, Cachetastic::Cacheable::ArAlbumCache.get(1)
|
44
44
|
|
45
45
|
song = ArSong.find(1)
|
46
|
-
assert !Cachetastic::
|
46
|
+
assert !Cachetastic::Cacheable.const_defined?("ArSongCache")
|
47
47
|
song.cache_self
|
48
|
-
assert Cachetastic::
|
49
|
-
assert_equal song, Cachetastic::
|
50
|
-
assert_equal album, Cachetastic::
|
48
|
+
assert Cachetastic::Cacheable.const_defined?("ArSongCache")
|
49
|
+
assert_equal song, Cachetastic::Cacheable::ArSongCache.get(1)
|
50
|
+
assert_equal album, Cachetastic::Cacheable::ArAlbumCache.get(1)
|
51
51
|
|
52
52
|
song.uncache_self
|
53
|
-
assert_nil Cachetastic::
|
53
|
+
assert_nil Cachetastic::Cacheable::ArSongCache.get(1)
|
54
54
|
|
55
55
|
ac = ArAlbum.get_from_cache(1)
|
56
56
|
assert_not_nil ac
|
@@ -0,0 +1,72 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), "test_helper")
|
2
|
+
|
3
|
+
class Person
|
4
|
+
include Cachetastic::Cacheable
|
5
|
+
|
6
|
+
attr_accessor :name
|
7
|
+
|
8
|
+
def cachetastic_key
|
9
|
+
self.name
|
10
|
+
end
|
11
|
+
|
12
|
+
def always_the_same(x, y)
|
13
|
+
cacher("always_the_same") do
|
14
|
+
x + y
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
class Unknown
|
21
|
+
include Cachetastic::Cacheable
|
22
|
+
end
|
23
|
+
|
24
|
+
class CacheableTest < Test::Unit::TestCase
|
25
|
+
|
26
|
+
def test_cache_classes_are_auto_genned
|
27
|
+
assert !Cachetastic::Cacheable.const_defined?("PersonCache")
|
28
|
+
assert Person.cache_class == Cachetastic::Cacheable::PersonCache
|
29
|
+
assert Cachetastic::Cacheable.const_defined?("PersonCache")
|
30
|
+
assert !Cachetastic::Cacheable.const_defined?("UnknownCache")
|
31
|
+
assert Unknown.cache_class == Cachetastic::Cacheable::UnknownCache
|
32
|
+
assert Cachetastic::Cacheable.const_defined?("UnknownCache")
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_no_cachetastic_key
|
36
|
+
assert_raise(NoMethodError) { Unknown.new.cachetastic_key }
|
37
|
+
assert_raise(NoMethodError) { Unknown.new.cache_self }
|
38
|
+
assert_raise(NoMethodError) { Unknown.new.uncache_self }
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_cache_uncache_self
|
42
|
+
p = Person.new
|
43
|
+
p.name = "Mark Bates"
|
44
|
+
assert_nil Cachetastic::Cacheable::PersonCache.get("Mark Bates")
|
45
|
+
p.cache_self
|
46
|
+
assert_equal p, Cachetastic::Cacheable::PersonCache.get("Mark Bates")
|
47
|
+
p.uncache_self
|
48
|
+
assert_nil Cachetastic::Cacheable::PersonCache.get("Mark Bates")
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_cacher
|
52
|
+
p = Person.new
|
53
|
+
assert_nil Cachetastic::Cacheable::PersonCache.get("always_the_same")
|
54
|
+
assert_equal 4, p.always_the_same(1,3)
|
55
|
+
assert_equal 4, Cachetastic::Cacheable::PersonCache.get("always_the_same")
|
56
|
+
assert_equal 4, p.always_the_same(99,99)
|
57
|
+
assert_equal 4, Person.get_from_cache("always_the_same")
|
58
|
+
assert_nil Cachetastic::Cacheable::PersonCache.get("say_hi")
|
59
|
+
Person.cacher("say_hi") do
|
60
|
+
"hi there"
|
61
|
+
end
|
62
|
+
assert_equal "hi there", Cachetastic::Cacheable::PersonCache.get("say_hi")
|
63
|
+
assert_equal "hi there", Person.get_from_cache("say_hi")
|
64
|
+
assert_equal "hi there", Person.cacher("say_hi")
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_get_from_cache
|
68
|
+
assert_nil Person.get_from_cache("i should be nil")
|
69
|
+
assert_equal 86, Person.get_from_cache("maxwell smart") {86}
|
70
|
+
end
|
71
|
+
|
72
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cachetastic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- markbates
|
@@ -52,13 +52,62 @@ files:
|
|
52
52
|
- lib/caches/cachetastic_caches_page_cache.rb
|
53
53
|
- lib/caches/cachetastic_caches_rails_session_cache.rb
|
54
54
|
- lib/cachetastic.rb
|
55
|
+
- lib/cachetastic_cacheable.rb
|
55
56
|
- lib/cachetastic_connection.rb
|
56
57
|
- lib/cachetastic_logger.rb
|
57
58
|
- lib/errors/cachetastic_errors_unsupported_adapter.rb
|
58
|
-
- lib/helpers/cachetastic_helpers_active_record.rb
|
59
59
|
- lib/rails_extensions/cachetastic_active_record_base.rb
|
60
60
|
- lib/rails_extensions/cgi_session_cachetastic_store.rb
|
61
|
+
- lib/ruby_extensions/object.rb
|
61
62
|
- README
|
63
|
+
- doc/classes/ActiveRecord/Base.html
|
64
|
+
- doc/classes/Cachetastic/Adapters/Base.html
|
65
|
+
- doc/classes/Cachetastic/Adapters/Drb.html
|
66
|
+
- doc/classes/Cachetastic/Adapters/File.html
|
67
|
+
- doc/classes/Cachetastic/Adapters/FileBase.html
|
68
|
+
- doc/classes/Cachetastic/Adapters/HtmlFile.html
|
69
|
+
- doc/classes/Cachetastic/Adapters/LocalMemory.html
|
70
|
+
- doc/classes/Cachetastic/Adapters/Memcache.html
|
71
|
+
- doc/classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html
|
72
|
+
- doc/classes/Cachetastic/Cacheable/ClassOnlyMethods.html
|
73
|
+
- doc/classes/Cachetastic/Cacheable.html
|
74
|
+
- doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html
|
75
|
+
- doc/classes/Cachetastic/Caches/Base.html
|
76
|
+
- doc/classes/Cachetastic/Caches/MackSessionCache.html
|
77
|
+
- doc/classes/Cachetastic/Caches/PageCache.html
|
78
|
+
- doc/classes/Cachetastic/Caches/RailsSessionCache.html
|
79
|
+
- doc/classes/Cachetastic/Connection.html
|
80
|
+
- doc/classes/Cachetastic/Errors/UnsupportedAdapter.html
|
81
|
+
- doc/classes/Cachetastic/Logger.html
|
82
|
+
- doc/classes/CGI/Session/CachetasticStore.html
|
83
|
+
- doc/classes/Object.html
|
84
|
+
- doc/created.rid
|
85
|
+
- doc/files/lib/adapters/cachetastic_adapters_base_rb.html
|
86
|
+
- doc/files/lib/adapters/cachetastic_adapters_drb_rb.html
|
87
|
+
- doc/files/lib/adapters/cachetastic_adapters_file_base_rb.html
|
88
|
+
- doc/files/lib/adapters/cachetastic_adapters_file_rb.html
|
89
|
+
- doc/files/lib/adapters/cachetastic_adapters_html_file_rb.html
|
90
|
+
- doc/files/lib/adapters/cachetastic_adapters_local_memory_rb.html
|
91
|
+
- doc/files/lib/adapters/cachetastic_adapters_memcache_rb.html
|
92
|
+
- doc/files/lib/adapters/cachetastic_adapters_store_object_rb.html
|
93
|
+
- doc/files/lib/caches/cachetastic_caches_base_rb.html
|
94
|
+
- doc/files/lib/caches/cachetastic_caches_mack_session_cache_rb.html
|
95
|
+
- doc/files/lib/caches/cachetastic_caches_page_cache_rb.html
|
96
|
+
- doc/files/lib/caches/cachetastic_caches_rails_session_cache_rb.html
|
97
|
+
- doc/files/lib/cachetastic_cacheable_rb.html
|
98
|
+
- doc/files/lib/cachetastic_connection_rb.html
|
99
|
+
- doc/files/lib/cachetastic_logger_rb.html
|
100
|
+
- doc/files/lib/cachetastic_rb.html
|
101
|
+
- doc/files/lib/errors/cachetastic_errors_unsupported_adapter_rb.html
|
102
|
+
- doc/files/lib/rails_extensions/cachetastic_active_record_base_rb.html
|
103
|
+
- doc/files/lib/rails_extensions/cgi_session_cachetastic_store_rb.html
|
104
|
+
- doc/files/lib/ruby_extensions/object_rb.html
|
105
|
+
- doc/files/README.html
|
106
|
+
- doc/fr_class_index.html
|
107
|
+
- doc/fr_file_index.html
|
108
|
+
- doc/fr_method_index.html
|
109
|
+
- doc/index.html
|
110
|
+
- doc/rdoc-style.css
|
62
111
|
has_rdoc: false
|
63
112
|
homepage: http://www.mackframework.com
|
64
113
|
post_install_message:
|
@@ -88,6 +137,7 @@ specification_version: 2
|
|
88
137
|
summary: A very simple, yet very powerful caching framework for Ruby.
|
89
138
|
test_files:
|
90
139
|
- test/active_record_test.rb
|
140
|
+
- test/cacheable_test.rb
|
91
141
|
- test/cachetastic_unit_test.rb
|
92
142
|
- test/config.yml
|
93
143
|
- test/data_mapper_test.rb
|